.NET MAUI Scheduler TimeRuler Labels Styling
The Scheduler for .NET MAUI provides style property for the labels displayed on the major tick in the time ruler of the day views (Day, Week and MultiDay views).
Through the TimeRulerLabelStyle
property of the corresponding ViewDefinition
(Day, Week or MultiDay) you can apply style to the Label controls shown on the major ticks in the time ruler.
Here is a quick example on how TimeRulerLabelStyle
property can be used:
1. Define the Scheduler:
<telerik:RadScheduler x:Name="scheduler" ActiveViewDefinitionIndex="1">
<telerik:RadScheduler.ViewDefinitions>
<telerik:DayViewDefinition TimeRulerLabelStyle="{StaticResource TimeRulerLabelStyle}" />
<telerik:WeekViewDefinition TimeRulerLabelStyle="{StaticResource TimeRulerLabelStyle}" />
</telerik:RadScheduler.ViewDefinitions>
</telerik:RadScheduler>
2. Add the custom styles to the page's resources:
<Style TargetType="Label" x:Key="TimeRulerLabelStyle">
<Setter Property="FontFamily" Value="Courier New" />
<Setter Property="FontAttributes" Value="Bold" />
<Setter Property="FontSize" Value="12" />
<Setter Property="TextColor" Value="#B35900" />
</Style>
Check the result below: