Component Data Binding
DataBinding is core to XPComponents, all components directly support data binding, no classes to include, nothing to enable, its all there built in from the ground up.
The XP Components provide a powerful feature rich DataBinding architecture
Data binding in its traditional sense means associating some underlying data with one or more user interface elements. The data provides the information to display. The user interface elements render the information in the appropriate format.
The XP Data Architecture extends the traditional idea of data binding in a number of ways. You can bind a property of a user interface element to a property of any object, or to an attribute of an XMLNode.
The data binding can be unidirectional (in either direction) or bidirectional. For example, traditional data binding has the information in the data source flow to its bound user interface element. Alternatively, the information in the user interface element can flow back to the data source. Bidirectional data binding, of course, supports information flow in each direction and enables user input via user interface element to update the data in the data source.
Data binding can also be static (one time only) or dynamic. With static data binding, the information transfer occurs when you initially create the data binding. Subsequent changes to values in the data do not affect the value in the user interface element. Dynamic data binding allows changes to data in the data source to propagate to the User Interface element and vice versa.
Data binding also supports transformation of the data as it flows to and from the data source and user interface elements. This transformation enables the application author to add UI semantics to the data.
Some typical transformations might be the following:
- Displaying negative numbers in red and positive numbers in black *Displaying images based on a contact being online or offline *Creating dynamic bar charts by binding a rectangle’s height to a stock price *Animating the position of an image by binding its coordinates to a property of a object
- Data binding is also fundamentally asynchronous. A user interface element receives an event when a new data source binds to the element. In addition, as a data source collects its data, it fires events to indicate that its contents have changed.
One can data-bind to any object or XMLNode, and hence one can easily data-bind to various data models. A number of built-in data source classes are provided that allow you to easily and declaratively bring data asynchronously into an application. There are specific data sources for XML, Objects. The data source model is extensible, so you can create your own custom data source classes when necessary.
Source : ePresenterPlus
