Scheduler for WPF | ComponentOne
Customize Scheduler / Link Scheduler to a Calendar
In This Topic
    Link Scheduler to a Calendar
    In This Topic

    The following topic explains how to bind a schedule to a C1Calendar control in Visual Studio, using XAML.

    To link the Scheduler control to a Calendar control, follow these steps:

    1. Add a C1Scheduler and C1Calendar control to the XAML designer.
    2. Select the C1Scheduler control.
    3. In the Properties window, enter name for the Scheduler control in the Name text box, say C1Scheduler1.
    4. In the XAML view, set its Margin, Vertical and Horizontal alignments according to the window size.
    5. Select the C1Calendar control you added to the designer.
    6. In the XAML view, edit the <c1:C1Calendar><c1:C1Calendar /> tag by adding the following code. In this code, SelectedDate property of the C1Calendar class is used to bind the Calendar and Scheduler controls.
      XAML
      Copy Code
      <c1:C1Calendar x:Name="c1Calendar1" SelectedDate="{Binding Path=SelectedDateTime, ElementName=C1Scheduler1, Mode=TwoWay}" Margin="10,20,605,234" HorizontalAlignment="Left" VerticalAlignment="Top"></c1:C1Calendar>
      

      Similarly, you can use SelectedDates property of the C1Calendar class to bind Calendar and Scheduler in order.

    7. Press F5 to run the project and select a date in the C1Calendar. The schedule’s selected date will change accordingly.