Intersoft.Client.UI.Aqua.UXInput Namespace : UXMaskedInput Class |
Public Class UXMaskedInput Inherits Intersoft.Client.UI.Aqua.UXInput.UXMaskedInputGenericBase(Of String) Implements Intersoft.Client.Framework.IControl, Intersoft.Client.Framework.IFramework, Intersoft.Client.Framework.ILicensing, Intersoft.Client.Framework.Input.ICommandSource
Dim instance As UXMaskedInput
public class UXMaskedInput : Intersoft.Client.UI.Aqua.UXInput.UXMaskedInputGenericBase<string>, Intersoft.Client.Framework.IControl, Intersoft.Client.Framework.IFramework, Intersoft.Client.Framework.ILicensing, Intersoft.Client.Framework.Input.ICommandSource
public ref class UXMaskedInput : public Intersoft.Client.UI.Aqua.UXInput.UXMaskedInputGenericBase<String>, Intersoft.Client.Framework.IControl, Intersoft.Client.Framework.IFramework, Intersoft.Client.Framework.ILicensing, Intersoft.Client.Framework.Input.ICommandSource
UXMaskedInput allows one edit format that determined by the EditMask property.
During editing mode, UXMaskedInput will use the EditMask property to determine the edit text by evaluating the Value of UXMaskedInput. When it is not in edit mode it will use the display text which determined by the DisplayMode property. The default value of DisplayMode property is EditText which mean it will display the editing text when this mode is used. On the other hand if you can set the DisplayMode property to Value to use the value of UXMaskedInput as displayed text.
Edit mode is triggered if the UXMaskedInput has focus and is not readonly. By default the caret is positioned at the first editable position. Display mode is triggered if the UXMaskedInput does not has focus. |
The Value of UXMaskedInput is determined by IsSaveMask or IsSaveLiteral property. IsSaveMask will save the mask character to the value and IsSaveLiteral will save the literal to the value. The Value property accept valid text with any combination of IsSaveLiteral or IsSaveMask.
For example a common phone pattern of (999)000-000 with value 5551234
XAML |
Copy Code
|
---|---|
<intersoft:UXMaskedInput Width="200" Height="24" EditMask="(999)000-0000" IsSaveLiteral="True" IsSaveMask="True"/> |
IsSaveLiteral | IsSaveMask | Value |
---|---|---|
True | True | (___)555-1234 |
True | False | ( )555-1234 |
False | True | ___5551234 |
False | False | 5551234 |
The EditMask property accept these format:
Character | Description |
---|---|
0 | Digit (0 to 9, entry required, plus [+] and minus [–] signs not allowed). |
9 | Digit or space (entry not required, plus and minus signs not allowed). |
# | Digit or space (entry not required; spaces are displayed as blanks while in Edit mode, but blanks are removed when data is saved; plus and minus signs allowed). |
L | Letter (A to Z, entry required). |
? | Letter (A to Z, entry optional). |
A | Letter or digit (entry required). |
a | Letter or digit (entry optional). |
& | Any character or a space (entry required). |
C | Any character or a space (entry optional). |
< | Causes all characters to be converted to lowercase. |
> | Causes all characters to be converted to uppercase. |
\ | Causes the character that follows to be displayed as the literal character (for example, \A is displayed as just A). |
By default the EditMask is set to aaaaa.
The MaskCharacter property allows a single character custom mask. By default the MaskCharacter is _.
XAML |
Copy Code
|
---|---|
<Intersoft:UXMaskedInput Width="200" EditMask="(999)000-0000"/> |
System.Object
System.Windows.DependencyObject
System.Windows.UIElement
System.Windows.FrameworkElement
System.Windows.Controls.Control
System.Windows.Controls.TextBox
Intersoft.Client.Framework.ISTextBox
Intersoft.Client.UI.Controls.UXTextBox
Intersoft.Client.UI.Aqua.UXInput.UXMaskedInputBase
Intersoft.Client.UI.Aqua.UXInput.UXMaskedInputGenericBase<T>
Intersoft.Client.UI.Aqua.UXInput.UXMaskedInput
Target Platforms: Windows 7, 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