top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

Explain Different types of Modes in DataBinding??

+2 votes

Hi frnds any one help what are the different Modes and its types available in databinding in XAML its for wp8 application development......

posted Oct 30, 2014 by Puhal

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

+2 votes

There are three types of data binding that happens in Silverlight applications between a source and target.

  1. OneTime data binding.
  2. OneWay data binding (default mode)
  3. TwoWay data binding.

1) OneTime – The data is set when Binding is initialized – mostly used in ReadOnly mode.

2) OneWay – Updates data from source to target, so if source changes the target is notified (Default if not specified)

3) TwoWay – Updates data from source to target and vice-versa, so if source changes the target is notified or vice versa.


enter image description here

answer Oct 31, 2014 by Jdk
+1 vote

Here I am not much aware of this but still want to conclude it:

OneWay: use this when you want the data in code-behind to modify the value in your GUI
TwoWay: use this if you want to allow code-behind to modify the GUI value, or if you want the GUI value changed by the user to be reflected in code-behind
OneTime: your code-behind can set the value that is shown in your GUI once, and it will never change again. Only do this if you know you're not going to need to change the value in your code-behind.
OneWayToSource: This is the opposite of one way -- GUI value affects code behind value.
If you don't specify anything, then the behavior will depend on the control that you are using.

For More:

answer Oct 30, 2014 by Amit Kumar Pandey
Contact Us
+91 9880187415
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Karnataka INDIA.