ComponentOne Scheduler for WPF: Using Scheduler for WPF > Assigning Values to a Nested Property

Assigning Values to a Nested Property

XAML does not provide the ability to assign a value to a nested property. However, the object model of the DataStorage contains nested properties by nature. To work around this limitation, the NestedPropertySetter class can be used.

Note: The NestedPropertySetter class works in a conjunction with C1Scheduler only.

Elements of this class, being placed as children of a C1Scheduler element in XAML, represent setters as Property/Value pairs where the Property specifies a property path relative to a parent C1Scheduler element. In the following example, the DataMember property is assigned to the Appointments table of a database. The DataSource is set to the data set resource in the project:

<c1sched:C1Scheduler >

        <!-- Map AppointmentStorage -->

        <c1sched:NestedPropertySetter PropertyName="DataStorage.AppointmentStorage.DataMember" Value="Appointments"/>

        <c1sched:NestedPropertySetter PropertyName="DataStorage.AppointmentStorage.DataSource" Value="{StaticResource dataSet}"/>

</c1sched:C1Scheduler >


Send comments about this topic to ComponentOne.
Copyright © 1987-2010 ComponentOne LLC. All rights reserved.