Articles in this section
Category / Section

How to customize week number using DataTemplate in WinUI Scheduler (Calendar)

1 min read

Customize the default appearance of a week number template in the month view, by using the WeekNumberTemplate property of the MonthViewSettings in the WinUI Scheduler.

XAML

Display the week number of a year in the scheduler month view by setting the ShowWeekNumber to true in the MonthViewSettings, and customize the week number appearance by using the WeekNumberTemplate property of the MonthViewSettings.

<Grid>
    <syncfusion:SfScheduler 
                        x:Name="Schedule" 
                        ViewType="Month" >
        <syncfusion:SfScheduler.MonthViewSettings>
            <syncfusion:MonthViewSettings ShowWeekNumber="True">
                <syncfusion:MonthViewSettings.WeekNumberTemplate>
                    <DataTemplate>
                        <Grid >
                            <TextBlock 
                                  Foreground="Red"
                                  Text="{Binding}"
                                  VerticalAlignment="Top"
                                  HorizontalAlignment="Right"
                                  FontStyle="Normal">
                            </TextBlock>
                        </Grid>
                    </DataTemplate>
                </syncfusion:MonthViewSettings.WeekNumberTemplate>
            </syncfusion:MonthViewSettings>
        </syncfusion:SfScheduler.MonthViewSettings>
    </syncfusion:SfScheduler>
</Grid>

Customize week number using DataTemplate in the WinUI Scheduler

Take a moment to pursue the documentation. You can also find the options like customizing the week number.

 

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