Articles in this section

How to navigate to the specific month in WinUI Scheduler (Calendar)

Visible dates can be moved to a specific date using the DisplayDate property available in the Scheduler. It is applicable for all the SchedulerViewType in the WinUI Scheduler.

C#

Create a ViewModel class and add a DisplayDate property with a specific date.

public class SchedulerViewModel : INotifyPropertyChanged
{
    private DateTime displaydate = new DateTime(2021, 07, 10, 10, 0, 0);
    public DateTime DisplayDate
    {
        get
        {
            return this.displaydate;
        }
        set
        {
            this.displaydate = value;
            this.RaiseOnPropertyChanged("DisplayDate");
        }
    }
}

XAML

Bind the DisplayDate ViewModel property to the DisplayDate property of the SfScheduler.

<Grid>
    <Grid.DataContext>
        <local:SchedulerViewModel/>
    </Grid.DataContext>
 
    <scheduler:SfScheduler 
        x:Name="Schedule"
        ViewType="Month"
        DisplayDate="{Binding DisplayDate}" >
 
    </scheduler:SfScheduler>
</Grid>

Focus

Take a moment to pursue the documentation. You can also find the options like Programmatic date navigation.

 

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied