Which binding expression should you use?

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 the TextBox control.
Which binding expression should you use?

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 the TextBox control.
Which binding expression should you use?

A.
{ Binding Path=StringMember, Mode=TwoWay }

B.
{ Binding Path=StringMember, NotifyOnSourceUpdated=True }

C.
{ Binding Path=StringMember, NotifyOnTargetUpdated=True }

D.
{ Binding Path=StringMember, UpdateSourceTrigger=PropertyChanged }



Leave a Reply 1

Your email address will not be published. Required fields are marked *


lliterola

lliterola

It’s A