Articles in this section

How to show week numbers and customize the week number cells

In Calendar control we can include week number and also this can be customized. To display week numbers in calendar enable ShowWeekNumbers property. To customize week number cells use the below properties

  • WeekNumberBackground
  • WeekNumberBorderBrush
  • WeekNumberCornerRadius
  • WeekNumberBorderThickness
  • WeekNumberForeground

XAML

<syncfusion:CalendarEdit Background="AliceBlue" Name="calendarEdit" sf:SkinStorage.VisualStyle="Metro" ShowWeekNumbers="True"  WeekNumberBackground="DeepSkyBlue" WeekNumberForeground="WhiteSmoke" WeekNumberBorderBrush="LightBlue" WeekNumberBorderThickness="2" WeekNumberCornerRadius="3"  />
 

 

C#

        public MainWindow()
        {
            InitializeComponent();
            calendarEdit.WeekNumberBackground = Brushes.DeepSkyBlue;
            calendarEdit.WeekNumberForeground = Brushes.WhiteSmoke;
            calendarEdit.WeekNumberCornerRadius = new CornerRadius(3);
            calendarEdit.WeekNumberBorderBrush = Brushes.LightBlue;
            calendarEdit.WeekNumberBorderThickness = new Thickness(2);
        }

 

The following screenshots illustrates the output of the above code example

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