Breaking Change T937446
Visible to All Users

TimeSpan masks now show optional segments between visible segments by default

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.

Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.