nerdexam
Microsoft

70-511 · Question #153

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=Two way}
  • B{Binding Path=StringMember, NotifyOnSourceUpdated=True}
  • C{Binding Path=StringMember, NotifyOnTargetUpdated=True}
  • D{Binding Path=StringMember, UpdateSourceTrigger=PropertyChanged}

How the community answered

(53 responses)
  • A
    4% (2)
  • B
    6% (3)
  • C
    13% (7)
  • D
    77% (41)

Community Discussion

No community discussion yet for this question.

Full 70-511 Practice