PrepAway - Latest Free Exam Questions & Answers

Which XAML fragment should you insert at line 07?

You are developing a Silverlight 4 application. The application has an XAML page that contains the following XAML fragment. (Line numbers are included for reference only.)

01 <ComboBox x:Name=”cbName”>
02 <ComboBoxItem Content=”One”/>
03 <ComboBoxItem Content=”Two”/>
04 </ComboBox>
05 <Rectangle>
06 <i:Interaction.Triggers>
07
08 </i:Interaction.Triggers>
09 </Rectangle>

You need to allow the user to call an ICommand named GetPeopleCommand when the user clicks the Rectangle. You also need to pass the selected value of the ComboBox to GetPeopleCommand. Which XAML fragment should you insert at line 07?

PrepAway - Latest Free Exam Questions & Answers

A.
<i:EventTrigger EventName=”MouseLeftButtonDown”>
<i:InvokeCommandAction Command=”{Binding GetPeopleCommand}” CommandParameter=”{Binding SelectedItem, ElementName=cbName}”/>
</i:EventTrigger>

B.
<i:EventTrigger EventName=”MouseButtonDown”>
<i:InvokeCommandAction Command=”{Binding GetPeopleCommand}” CommandParameter=”{Binding SelectedItem, ElementName=cbName}”/>
</i:EventTrigger>

C.
<i:EventTrigger EventName=”MouseLeftButtonDown”>
<i:InvokeCommandAction Command=”{Binding GetPeopleCommand}” CommandParameter=”{Binding SelectedValue, ElementName=cbName}”/>
</i:EventTrigger>

D.
<i:EventTrigger EventName=”MouseButtonDown”>
<i:InvokeCommandAction Command=”{Binding GetPeopleCommand}” CommandParameter=”{Binding SelectedValue, ElementName=cbName}”/>
</i:EventTrigger>


Leave a Reply