What Changed
In versions earlier than 20.2, TimeSpan masks hid optional segments as follows.
XAML<dxe:TextEdit
Mask="[h H ][m M ][s S]"
MaskType="TimeSpan"
MaskUseAsDisplayFormat="True" />
In v20.2, we show optional segments between visible segments. For example:
Reasons for Change
The previous behavior does not allow you to recognize the entered value if a mask does not contain specifiers like H
, M
, and S
. For example:
XAML<dxe:TextEdit
x:Name="editor"
dxe:TimeSpanMaskOptions.DefaultPart="Hours"
Mask="[hh:][mm:]ss"
MaskType="TimeSpan"
MaskUseAsDisplayFormat="True" />
<TextBlock Text="{Binding ElementName=editor, Path=EditValue}" />
In this example, if you enter 1
, switch to seconds, and enter 2
, the editor displays "01:02", although the underlying value is "01:00:02".
How to Update Existing Apps
To revert to the previous behavior, set the attached TimeSpanMaskOptions.HideInsignificantPartsOnly property to false
.