Simple Data Binding UWP






4.71/5 (6 votes)
How to bind data in a simple way without writing any code
Introduction
Now, I will explain how to do data binding in a simple way in just a few steps. In this example, we will bind some elements so changing the value of one effects the value of other dynamically.
- Create a new project and add a
slider
,textblock
andprogressbar
. - Now first bind the
progressbar
with theslider
, for this we have to bind thevalue
attribute ofprogressbar
with the value attribute of the slider. - Now also bind the
textblock
’s text attribute with the slider’svalue
attribute. After the successful binding, the small indicator will turn into yellow. andtextblock
value will be0
. - Now run the project and see the binding in action .
Source code: https://github.com/umerqureshi93/SimpleDataBinding
Personal blog: http://csdebugger.blogspot.com/