free Microsoft 70-506 practice
1.You are developing a Silverlight 4 application.
The application defines the following three event handlers. (Line numbers are included for reference
only.)
01 private void HandleCheck(object sender, RoutedEventArgs e)
02 {
03 MessageBox.Show("Checked")
04 }
05
06 private void HandleUnchecked(object sender, RoutedEventArgs e)
07 {
08 MessageBox.Show("Unchecked")
09 }
10
11 private void HandleThirdState(object sender, RoutedEventArgs e)
12 {
13 MessageBox.Show("Indeterminate")
14 }
You need to allow a check box that can be selected, cleared, or set to Indeterminate. You also need to
ensure that the event handlers are invoked when the user changes the state of the control.
Which XAML fragment should you use?
A. IsChecked="True" Checked="HandleCheck"
Indeterminate="HandleUnchecked" Unchecked="HandleUnchecked" />
B. IsThreeState="True" Checked="HandleCheck"
Indeterminate="HandleThirdState" Unchecked="HandleUnchecked" />
C. IsHitTestVisible="True" Checked="HandleCheck"
Indeterminate="HandleThirdState" Unchecked="HandleUnchecked" />
D. IsEnabled="True" Checked="HandleCheck"
Indeterminate="HandleUnchecked" Unchecked="HandleUnchecked" />
Answer: B
2.You are developing a Silverlight 4 application.
You have a collection named ColPeople of the List type. You define the Person class according
to the following code segment.
public class Person
{
public string Name {get set }
public string Description { get set }
public string Gender { get set }
public int Age { get set }
public int Weight { get set }
}
You need to bind ColPeople to a ComboBox so that only the Name property is displayed.
Which XAML fragment should you use?
A. DisplayMemberPath="Name" />
B. DisplayMemberPath="ColPeople" />
C.
D.
Answer: A