Data Binding In Windows 8. Part 3–Element Binding

In my previous post, I discussed the three modes of DataBinding for Windows 8. Today CheckBoxwe’ll take a brief look at binding not to data, but rather binding one UI element to the value of another.  In this example, we’ll bind the IsActive property of the ProgressRing to the IsChecked property’s value in a CheckBox. 

             Margin="0,0,20,0" />
                 IsActive="{Binding IsChecked, 
                    ElementName=ActiveCB}" />
         Content="Active?" />

Notice that the IsActive property is bound to the IsChecked property and the ElementName (ActiveCB) is the Name of the CheckBox with that property. 

That’s it, there is no code associated with this example; just the XAML.

About Jesse Liberty

Jesse Liberty has three decades of experience writing and delivering software projects and is the author of 2 dozen books and a couple dozen Pluralsight & LinkedIn Learning courses. He was a Senior Technical Evangelist for Microsoft, a Distinguished Software Engineer for AT&T, a VP for Information Services for Citibank and a Software Architect for PBS. He is a Xamarin Certified Mobile Developer and a Xamarin MVP and a Microsoft MVP.
This entry was posted in Essentials. Bookmark the permalink.

2 Responses to Data Binding In Windows 8. Part 3–Element Binding

Comments are closed.