This project has moved. For the latest updates, please go here.

DateTime format in PropertyGrid

Developer
Mar 7 at 5:57 PM
A user said :

How do I change the "format" of the standard DateTime editor? I want to display a date only. I tried something like this but nothing has changed at all. I also tried "Text=" in the DateTimeUpDown

<xctk:PropertyGrid x:Name="propertyGridOut" Margin="0,0,0,0" BorderBrush="black" >
<xctk:PropertyGrid.EditorDefinitions>
<xctk:EditorTemplateDefinition>
<xctk:EditorTemplateDefinition.TargetProperties>
<xctk:TargetPropertyType Type="{x:Type sys:DateTime}" />
</xctk:EditorTemplateDefinition.TargetProperties>
<xctk:EditorTemplateDefinition.EditingTemplate>
<DataTemplate>
<xctk:DateTimeUpDown Value="{Binding Value}" Format="ShortDate" />
</DataTemplate>
</xctk:EditorTemplateDefinition.EditingTemplate>
</xctk:EditorTemplateDefinition>
</xctk:PropertyGrid.EditorDefinitions>
</xctk:PropertyGrid>
Developer
Mar 7 at 6:03 PM
Edited Mar 7 at 6:03 PM
Using v3.0, here's the result I get with and without your PropertyGrid.EditorDefinitions :
https://postimg.org/image/k5p8yqwvp

So everything looks good.

――――
Get more controls, features, updates and technical support with Xceed Toolkit Plus for WPF
Developer
Mar 7 at 6:57 PM
The discussion https://wpftoolkit.codeplex.com/discussions/661756 also refers to this.

――――
Get more controls, features, updates and technical support with Xceed Toolkit Plus for WPF