# Link Scheduler to a Calendar

## Content



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

![](https://cdn.mescius.io/document-site-files/images/4c5f07fe-a0aa-4d09-95ef-6685908019cd/linking_a_scheduler_to_a_calendar_files/image001.png)

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.  **I**n 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.
    
    ```xml
    <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.