nerdexam
Microsoft

70-511 · Question #13

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. The application displays a list of books. You write the following code fragment. (Line numbers are…

The correct answer is B. <Style.Triggers>. See the full explanation below for the reasoning.

Question

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. The application displays a list of books. You write the following code fragment. (Line numbers are included for reference only.) 01 <Window. Resources> 02 <XmlDataProvider x:Key="InventoryData" XPath="Books"> 03 <x:XData> 04 <Books xmlns=""> 05 <Book Title="XML in Action" Stock="in" /> 06 <Book Title="Inside C#" Stock-"out" /> 07 <Book Title="Introducing Microsoft .NET" Stock="in"/> 08 </Books> 09 </x:XData> 10 </XrolDataPi:ovider> 11 <Style x:Key="HyIternStyle" TargetType="{x:Type ListBoxItem) "> 12 13 </Style> 14 </Window.Resources> 15 <ListBox ItetnContainerStyle="{StaticResource HyItemstyle) "> 16 <ListBox.ItemsSource> 17 <Binding Source="{StaticResource InventoryData}" XPath="Book"/> 18 </ListBox. ItemsSource> 19 <ListBox. ItewTeitiplate> 20 <DataTemplate> 21 <TextBlock> 22 <TextBlock.Text> 23 <Binding XPath="@Title"/> 24 </TextBlock.Text> 25 </TextBlock> 26 </DotaTemplote> 27 </LiscBox. IcemTemplate 28 </ListBox>

Options

  • A<Style.Triggers>
  • B<Style.Triggers>
  • C<Style.Triggers>
  • D<Style.Triggers>

How the community answered

(49 responses)
  • A
    4% (2)
  • B
    71% (35)
  • C
    8% (4)
  • D
    16% (8)

Community Discussion

No community discussion yet for this question.

Full 70-511 Practice