Saturday, June 5, 2010

Data binding with Element in XAML


In WPF you can also bind data to property of any controls. Like if you have slider and want to bind value property to label then you can use data binding. You can use following code to bind data to elements.

            
                
                
            
            
            
                
                
            
        
In above code you can see we have to use two property of Binding class. ElementName which specify to which element we need to do databinding and path specifies which property we need to bind of that element.

No comments: