nerdexam
Microsoft

70-511 · Question #106

You are developing a Windows Presentation Foundation (WPF) application. Users can enter formatted percentages into text boxes. The markup is as follows. <TextBox Text="{Binding Path=Percentage…

The correct answer is B. public object ConvertBack(object value, Type targetType. See the full explanation below for the reasoning.

Question

You are developing a Windows Presentation Foundation (WPF) application. Users can enter formatted percentages into text boxes. The markup is as follows. <TextBox Text="{Binding Path=Percentage, Converter={StaticResource PercentValueConverter}}" /> Percentage is a decimal property. You need to store the percentages as their decimal values, not their display values. Which code segment should you use?

Options

  • Apublic object Convert (object value, Type targetType,
  • Bpublic object ConvertBack(object value, Type targetType,
  • Cpublic object ConvertBack(object value, Type targetType,
  • Dpublic object Convert(object value. Type targetType,

How the community answered

(22 responses)
  • A
    9% (2)
  • B
    73% (16)
  • C
    14% (3)
  • D
    5% (1)

Community Discussion

No community discussion yet for this question.

Full 70-511 Practice