Scheduler for WPF | ComponentOne
Customize Scheduler / Assign Values to a Nested Property
In This Topic
    Assign Values to a Nested Property
    In This Topic

    XAML does not provide the ability to assign a value to a nested property. However, the object model of the C1Scheduler.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 C1BindingSource.DataMember property is assigned to the Appointments table of a database. The C1BindingSource.DataSource is set to the data set resource in the project:

    XAML
    Copy Code
    <c1sched:C1Scheduler >
            <!-- Map AppointmentStorage -->
            <c1sched:NestedPropertySetter PropertyName="DataStorage.AppointmentStorage.DataMember" Value="Appointments"/>
            <c1sched:NestedPropertySetter PropertyName="DataStorage.AppointmentStorage.DataSource" Value="{StaticResource dataSet}"/>
    </c1sched:C1Scheduler >