Version

XamMaskedEditor Class

Value editor for displaying and editing data based on a mask.
Syntax
'Declaration
 
Public Class XamMaskedEditor 
   Inherits TextEditorBase
   Implements ISupportsSelectableText 
public class XamMaskedEditor : TextEditorBase, ISupportsSelectableText  
Remarks

XamMaskedEditor is an editor control that lets you display and edit values based on a mask. The mask is specified via its Mask property. If a mask is not explicitly set then a default mask is used based on the ValueType property. The default mask is determined using the masks that are registered for specific types using RegisterDefaultMaskForType.

There are certain type specific editors that are available that derive from XamMaskedEditor. They include XamCurrencyEditor, XamNumericEditor and XamDateTimeEditor. Although the XamMaskedEditor can be used to edit all these types, the derived editors default certain settings and provide more specific object model for editing the associated data types.

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