nerdexam
Microsoft

70-511 · Question #45

You are developing a Windows Presentation Foundation (WPF) application that displays pricing and inventory Information. A list box's ItemsSource property has decimal and string types. Decimals…

The correct answer is C. <DataTemplate x:Key="Scring" Template="clr:String">. See the full explanation below for the reasoning.

Question

You are developing a Windows Presentation Foundation (WPF) application that displays pricing and inventory Information. A list box's ItemsSource property has decimal and string types. Decimals represent price and strings represent messages such as "Discontinued" The following markup is defined as follows. (Line numbers are included for reference only.) You need to ensure that data templates are used to format the strings without changes and the decimals as currency. Which markup segment should you insert at line 05?

Exhibit

70-511 question #45 exhibit

Options

  • A<DataTemplate x:Key="clr:String">
  • B<DataTemplate x:Key "String" Template-"clr :String"> <TextBlock
  • C<DataTemplate x:Key="Scring" Template="clr:String">
  • D<DataTemplate DataType="(x: Type clr:String)">
  • E<DataTemplate DataType="clr:String"> <TextBlock

How the community answered

(53 responses)
  • A
    2% (1)
  • B
    2% (1)
  • C
    79% (42)
  • D
    11% (6)
  • E
    6% (3)

Community Discussion

No community discussion yet for this question.

Full 70-511 Practice