How do I change DaysOfWeek TextColor? #188
-
Can I set a style for DaysOfWeek labels (Mon,Tue,Wed...) in XCalendar? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Currently this is only supported through templating since the default template is just a label. The CalendarView's Here's a code snippet of the <DataTemplate x:DataType="{x:Type System:DayOfWeek}">
<Label
FontSize="15"
HorizontalTextAlignment="Center"
Text="{Binding ., Converter={StaticResource.LocalizeDayOfWeekAndCharLimitConverter}, ConverterParameter=3}"
TextColor="Black"
VerticalTextAlignment="Center"/>
</DataTemplate>
Issue #29 has more information/examples, and issue #165 may also be useful to look at. Let me know if you have any more questions :) |
Beta Was this translation helpful? Give feedback.
-
Thanks! It's worked. |
Beta Was this translation helpful? Give feedback.
Currently this is only supported through templating since the default template is just a label.
The CalendarView's
DayNameTemplate
property can be set to aDataTemplate
with a Label inside it. Then you just change the Label colour.Here's a code snippet of the
DataTemplate
the MAUI CalendarView uses by default:LocalizeDayOfWeekAndCharLimitConverter
is aValueConverter