.NET MAUI Calendar Day Styling
The Calendar control for .NET MAUI allows you to style the day names in the month view by setting the DayNameLabelStyle
(Style
with target type of Label
) property.
The follwoing example demonstrates how to style the day names:
1. Define the Calendar:
2. Define the style for the day names:
For a runnable example demonstrating how to style the days in the Calendar, see the SDKBrowser Demo Application and go to Calendar > Styling category.
Applying Style Selector
The Calendar control for .NET MAUI provides the DayStyleSelector
(of type CalendarStyleSelector
) property which specifies the style selector for the days in the month views of the Calendar.
The following example demonstrates how to style the days with the DayStyleSelector
property:
1. Define the Calendar:
2. The style selectors defined in the page's resources:
3. Add the CustomStyleSelector
class that inherits from CalendarStyleSelector
:
For a runnable example demonstrating how to style the days in the Calendar, see the SDKBrowser Demo Application and go to Calendar > Style Selector category.