Articles in this section

how to customize the DropDownbuttontemplate for DateTimeEdit

DropDownButton can be customized by DropDownButtonTemplate of DateTimeEdit with the TargetType as ToggleButton.

 

The same has been explained in the following code snippet:

XAML:

//Code explains how to customize the DropDownbuttontemplate 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="DateTimeEdit_FocusBehaviour.MainWindow"
Title="MainWindow" Height="350" Width="525">
<Grid>
<syncfusion:DateTimeEdit Name="DateTime" Width="180"  HorizontalAlignment="Center" Height="60"  Text="DateTimeEdit" >
<syncfusion:DateTimeEdit.DropDownButtonTemplate>
<ControlTemplate  TargetType="{x:Type ToggleButton}">
<Grid>
<Label Background="Yellow" BorderBrush="Red" BorderThickness="2">
</Label>
<Image Source="Drop.png"></Image>
</Grid>
</ControlTemplate>
</syncfusion:DateTimeEdit.DropDownButtonTemplate>
</syncfusion:DateTimeEdit>
</Grid>
</Window>

Output:

C:\Users\Ashok.Murugesan\Desktop\KBTask\13.4SprintKBTools\ScreenShot\DropDownButtonTemplate.png

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