I don't currently have an example for my question. I would just like to get some insight of the following : When should one use one or two way data binding in XAML ?
Thank you in advance for the time you take to answer this !
In summary: use OneWay if the property is readonly, use TowWay if you want to change it from your view.
- TwoWay updates the target property or the property whenever either the target property or the source property changes.
- OneWay updates the target property only when the source property changes.
Use OneWay if you only want to update the view from your model.
TwoWay also updates the model if you change the view. e.g. a TextBox. So you should use it when you want that your view can affect the model.
OneWayif the property is readonly, useTowWayif you want to change it from your view.