Articles in this section
Category / Section

How to set the font size of CalenderDayButton in DateTimeEdit

1 min read

Font size of the CalenderDayButton can be changed by CalendarDayButtonStyle in Calender which used in DateTimeEdit.

The same has been explained in the following code snippet:

XAML:

//How to set the FontSize in CalendarDayButton for DateTimeEdit
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:syncfusion="http://schemas.syncfusion.com/wpf" x:Class="DateTimeEditKB.MainWindow"
xmlns:Syncfusion_Windows_Controls="clr-namespace:Syncfusion.Windows.Controls;assembly=Syncfusion.Shared.Wpf"
xmlns:Syncfusion_Windows_Controls_Primitives="clr-namespace:Syncfusion.Windows.Controls.Primitives;assembly=
Syncfusion.Shared.Wpf"
Title="MainWindow" Height="350" Width="525">
<Window.Resources>
<Style x:Key="FontSize" TargetType="Syncfusion_Windows_Controls:Calendar">
<Setter Property="CalendarDayButtonStyle">
<Setter.Value>
<Style TargetType="{x:Type Syncfusion_Windows_Controls_Primitives:CalendarDayButton}">
<Setter Property="FontSize" Value="18">
 </Setter> 
</Style>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
 <Grid>
<syncfusion:DateTimeEdit Width="150" FontSize="25" HorizontalAlignment="Center" VerticalAlignment="Top" CalendarStyle="{StaticResource FontSize}"  />
</Grid>
</Window>

 

Output:

C:\Users\Ashok.Murugesan\Desktop\Navigation\datetimefontsize1.png

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