Data Binding
A data binding can provide objects or values, and can be used to provide the data to be edited or visualized by a control, or it can provide data to configure the control.
Data to be Edited or Visualized
Many controls only has the one Data Binding, as the nature of the control does not require anything more, like Text Edit, List Box, or Check Box. In these examples, the Text Edit requires one value or field from one object, while the list box requires a set of objects.
For controls that require more than one data binding, the locations and names of the data bindings can vary. For example, the Date Range Bar has the two such data bindings: Range Start, Range End, Selected Start, Selected End. The Chart control has a list of Series, which each has a data binding that provides the points to plot in the chart.
Data to Configure the Control
Many of the properties in a control allow data to be provided by a data binding. This makes the controls more dynamic than if the configuration is based on constants during design.
For example, the Date Range Bar has the two such data bindings: Range Start, Range End. The Track Bar has several data bindings to configure the control: Min Value, Max Value, Tick Frequency, Small Step, Large Step.
Properties
A data binding consist of the following properties, in which the first is always required, while the two other may be optional or unavailable.
Property | Description |
---|---|
Data Source | The data source that contains the data. Depending on the usage, the data source may contain one object or many objects. |
Active Object | The binding is dependent on the Active Object within the data source. If the data source contains many objects, and one only is required, the active object binding can be used to get the one object that is currently active from the data source. |
Field | The field in the data soure, that contains the data. This is required if the data binding requires a value. |
See also Data Binding, and Active Object.