MaskProperties.IgnoreMaskBlank Property

For the Simple, Regular and RegEx mask types this property gets or sets whether an editor can lose focus when a value hasn't been entered.

Namespace: DevExpress.XtraEditors.Mask

Assembly: DevExpress.XtraEditors.v20.1.dll

Declaration

public virtual bool IgnoreMaskBlank { get; set; }
Public Overridable Property IgnoreMaskBlank As Boolean

Property Value

Type Default Description
Boolean

true

true if an editor can lose focus when a value has not been entered; otherwise, false.

Remarks

This property is in effect for the MaskType.Simple, MaskType.Regular and MaskType.RegEx mask types. For other mask types this property is ignored since the masked editor doesn't support placeholders in other modes.

If the IgnoreMaskBlank property is set to true an empty editor can lose focus. If the editor's value is only partially completed (there are still empty placeholders) focus cannot be moved from the editor until an end-user enters the entire value or deletes the value by clearing the edit box.

If the IgnoreMaskBlank property is set to false focus cannot be moved from the editor until its value has been completely filled.

An error in the editor is indicated by an error icon:

CD_Mask_IgnoreMaskBlank_false

To provide an appropriate response when an invalid value has been entered the BaseEdit.InvalidValue event can be handled.

Note: for the RegEx mask type setting this property to true is equivalent to enclosing the current mask expression within braces and appending the question metacharacter. For instance, the "\d\d" mask with the IgnoreMaskBlank property set to true is equivalent to the "(\d\d)?" mask with the IgnoreMaskBlank property set to false.

See Also