nerdexam
Microsoft

70-511 · Question #3

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You write the following code fragment. < TextBox Text="{Binding…

The correct answer is D. { Binding Path=StringMember, UpdateSourceTrigger=PropertyChanged }. See the full explanation below for the reasoning.

Question

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You write the following code fragment. < TextBox Text="{Binding Path=StringMember} " / > You need to ensure that the StringMember property of the data-bound object is updated immediately when the user types in the TextBox control. Which binding expression should you use?

Options

  • A{ Binding Path=StringMember, Mode=TwoWay }
  • B{ Binding Path=StringMember, NotifyOnSourceUpdated=True }
  • C{ Binding Path-StringMember, NotifyOnTargetUpdated=True }
  • D{ Binding Path=StringMember, UpdateSourceTrigger=PropertyChanged }

How the community answered

(28 responses)
  • A
    4% (1)
  • B
    4% (1)
  • C
    11% (3)
  • D
    82% (23)

Community Discussion

No community discussion yet for this question.

Full 70-511 Practice