70-506 70-506 Microsoft Silverlight 4,Development

70-506 70-506 Microsoft Silverlight 4,Development 70-506 www.zertifizierung-portal.de

Prüfungsnummer : 70-506

Prüfungsnname: Microsoft Silverlight 4,Development

70-506 70-506 70-506 www.zertifizierung-portal.de

QUESTION 2
You are developing a Silverlight 4 application.
The application contains an XAML page that defines the following Grid control.

The codebehind file for myPage.xaml contains the following code segment. (Line numbers are included for reference only.)
01 public myPage()
02 {
03 InitializeComponent();
04
05 UserControl control = new MyCustomControl();
06
07 }
You need to replace the contents of the second row of gridBody with a user control of the MyCustomControl type. Which code segment should you insert at line 06?
A.
gridBody.Children.Insert(1, control);
B.
gridBody.RowDefinitions.Remove(gridBody.RowDefinitions[1]);
gridBody.Children.Insert(1, control);
C.
gridBody.Children.Clear();
Grid.SetRow(control, 1);
gridBody.Children.Add(control);
D.
List remove = gridBody.Children.Where(c => c is FrameworkElement && Grid.GetRow((FrameworkElement)c) == 1).ToList(); foreach (UIElement element in remove)
{
gridBody.Children.Remove(element);
}
Grid.SetRow(control, 1);
gridBody.Children.Add(control);

Answer: D

70-506 70-506 70-506 www.zertifizierung-portal.de

Hinterlasse eine Antwort