Version

DisplayMode Property

Returns or sets a value that determines how the control's contents will be displayed when the control is not in edit mode and data masking is enabled.
Syntax
'Declaration
 
Public Property DisplayMode As MaskMode
public MaskMode DisplayMode {get; set;}
Remarks

This property is used to determine how mask literals and prompt characters are displayed when the control is not in edit mode. Based on the setting of this property, the text of the control will contain no prompt characters or literals (just the raw data), the data and just the literals, the data and just the prompt characters, or all the text including both prompt characters and literals. The formatted spacing of partially masked values can be preserved by indicating to include literals with padding, which includes data and literal characters, but replaces prompt characters with pad characters (usually spaces).

Generally, prompt characters disappear when a cell is no longer in edit mode, as a visual cue to the user. In some cases, however, it may be appropriate in your application to display mask literals as well as data when a cell is no longer in edit mode.

Example
The following code creates a mask editor in XAML and sets some of the commonly used properties on it.

<igEditors:XamMaskedEditor x:Name="maskedEditor2" 
    
ValueType="{x:Type system:String}" 
    
Mask="###-##-####" 
    
DataMode="Raw"
    
DisplayMode="IncludeBoth"
    
>
    
<igEditors:XamMaskedEditor.ValueConstraint>
        
<igEditors:ValueConstraint Nullable="True" />
    
</igEditors:XamMaskedEditor.ValueConstraint>
</igEditors:XamMaskedEditor>
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also