Skip to main content

TextEdit.MaskUseAsDisplayFormat Property

Gets or sets whether display values are still formatted using the mask when the editor is not focused. This is a dependency property.

Namespace: DevExpress.Xpf.Editors

Assembly: DevExpress.Xpf.Core.v22.1.dll

NuGet Package: DevExpress.Wpf.Core


public bool MaskUseAsDisplayFormat { get; set; }

Property Value

Type Description

true, if the mask settings are used to format display values when the editor is not focused; false if the settings specified by the BaseEditSettings.DisplayFormat property are used.


Set the MaskUseAsDisplayFormat property to true to use the editor’s mask settings to format its display text when the editor is not focused. As a result, the editor’s text in edit and display modes will be identical.

To learn more, see Mask Type: Extended Regular Expressions.


<!-- Long date -->
<dxe:TextEdit Mask="D" MaskType="DateTime"
    MaskUseAsDisplayFormat="True" />
<!-- Currency -->
<dxe:TextEdit Mask="c" MaskType="Numeric"
    MaskUseAsDisplayFormat="True" />
<!-- Email address -->
<dxe:TextEdit Mask="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}"
    MaskType="RegEx" MaskUseAsDisplayFormat="True" />
See Also