Ho can i format date time value to be shown as dd/mm/yyyy with 24 hours clock ?
Tnx!
Hello,
Thank you for posting in our forums!
You can format any DateTime using the StringFormat property in a Binding.
For example, to display the date time as you require in the XamSliderDateTimeThumbs, you would need to re-template the ToolTip like so:
<Style TargetType="{x:Type ig:XamSliderDateTimeThumb}"> <Setter Property="ToolTipTemplate"> <Setter.Value> <DataTemplate> <TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType={x:Type ig:XamSliderDateTimeThumb}}, Path=Value, StringFormat='dd/MM/yyyy HH:mm'}"></TextBlock> </DataTemplate> </Setter.Value> </Setter> </Style>
If you need further assistance with this, please let me know and I will be glad to help.