Discover binding concepts within Xamarin.Forms for data or other static resources.
- [Instructor] Binding, especially data binding, is a way for your app's user interface to display and stay synchronized with the data as the data changes. Now I'm going to be throwing around the words binding and data binding, and when I say binding I don't always mean binding to data. Sometimes I might mean binding to a static or dynamic resource. All of these concepts are considered binding. So for example, in the olden days you may have an image control and you would name that control the image and then in your code behind you'd have to refer to the image.source equals some new bitmap or some new value in order to spit up a new image in that control.
With data binding we simply bind the source to a property on a class file in a model. So for example, we might bind to an image URL and as that image URL changes, the value of the image changes dynamically. Data binding gives us the ability to separate the data from a user interface in a way that is based on a conceptual model and really contributes to better readability and testability. But ultimately we don't have to worry about refactoring the code or changing control names, we don't even need controls to have names anymore, which really increases our ability to have both maintainability and extensibility as our app goes through the development process.
- Binding concepts
- Binding data to elements, lists, or other controls
- Binding techniques
- Implementing data binding
- Relaying commands to centralize an application's command logic
- Common scenarios for using commands in Xamarin.Forms
- Implementing converters