DataMode Property

Returns or sets a value that determines how the control's contents will be stored by the data source when data masking is enabled.
Public Property DataMode As MaskMode
public MaskMode DataMode {get; set;}

This property is used to determine how mask literals and prompt characters are handled when the control's contents are passed to the data source (or are retrieved using the Text property.) 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, simply the raw data is committed to the data source and data masking is used to format the data when it is displayed. In some cases, however, it may be appropriate in your application to store mask literals as well as data.

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}" 
<igEditors:ValueConstraint Nullable="True" />

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