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. <CheckBox x:Name="cb2" Content="Three State CheckBox" IsChecked="True" Checked="Handle Check "Indeterminate = "Handle Unchecked" Unchecked = "Handle Unchecked" />
B. <CheckBox x:Name="cb2" Content="Three State CheckBox" IsThreeState="True" Checked="HandleCheck" Indeterminate = "Handle Third State" Unchecked ="Handle Unchecked" />
C. <CheckBox x:Name="cb2" Content="Three State Check Box" Is HitT est Visible ="True" Checked ="Handle Check" Indeterminate ="Handle Third State" Unchecked="HandleUnchecked" />
D. <CheckBox x:Name="cb2" Content="Three State CheckBox" IsEnabled="True" Checked="Handle Check" Indeterminate ="Handle Unchecked" Unchecked ="Handle Unchecked" />
Answer:B
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. <CheckBox x:Name="cb2" Content="Three State CheckBox" IsChecked="True" Checked="Handle Check "Indeterminate = "Handle Unchecked" Unchecked = "Handle Unchecked" /> B. <CheckBox x:Name="cb2" Content="Three State CheckBox" IsThreeState="True" Checked="HandleCheck" Indeterminate = "Handle Third State" Unchecked ="Handle Unchecked" /> C. <CheckBox x:Name="cb2" Content="Three State Check Box" Is HitT est Visible ="True" Checked ="Handle Check" Indeterminate ="Handle Third State" Unchecked="HandleUnchecked" /> D. <CheckBox x:Name="cb2" Content="Three State CheckBox" IsEnabled="True" Checked="Handle Check" Indeterminate ="Handle Unchecked" Unchecked ="Handle Unchecked" />