How many ways we can Bind data?

Technology CommunityCategory: XamarinHow many ways we can Bind data?
VietMX Staff asked 3 years ago

There are four ways we can bind the data to the BindableObject.

  1. Default: When we use the Default Binding mode, it indicated that as OneWay binding, means, data change propagates from source (ViewModel in this case) to View element.
  2. OneWay: It reflects the change from source to View element as mentioned above. Example: Label uses OneWay binding.
  3. OneWayToSource: It reflects the changes from target (BindableObject) to source (ViewModel). This is basically used for the readonly Bindable Properties.
  4. TwoWay: It reflects the changes between source and target in both directions. Example: Entry generally uses the TwoWay binding.