The following sections walk you through the steps of binding the Scheduler control to a data source and using the PropertyBridge class for binding non-dependency properties.
To bind the Scheduler control to the C1NWind.mdb database, we must configure the data source. Then we can add the dataset as a resource in the project and map to the C1Scheduler Data Storage. To understand these steps in details, see Configure the Data Source and Bind Scheduler to the Data Source sections in the Quick Start topic.
The PropertyBridge class exposes two dependency properties, PropertyBridge.Source and PropertyBridge.Target, of the System.Object type, and keeps these property values equal. In other words, when the value of one property is changed, the other property is set to the same value. This simple behavior allows you to use non-DependencyProperty properties along with WPF mechanisms that are designed to work with DependencyProperty-only properties. The following examples show how the PropertyBridge class can be used:
The PropertyBridge class is derived from FrameworkElement and in order to work properly, it should be placed somewhere in the visual tree among other elements that it should communicate with. The derivation from FrameworkElement is intentional; it allows the PropertyBridge to be a part of a visual tree, which in turn provides bindings established on its properties with the correct context. For example, another theoretical option is to have PropertyBridge in the ResourceDictionary, but in this case, the bindings would be inoperable.
The PropertyBridge.Visibility property is set to Collapsed by default, so this object will not appear on a screen and doesn't participate in layout measurement and arrangement processes; it doesn't corrupt a visual representation of the visual tree where it is placed.