SftMask/NET covers all functions of the Windows Forms MaskedTextBox and NumericUpDown controls. It is not a drop-in replacement: it uses its own mask syntax (see Edit Masks), and its properties, methods, events and enumerations have their own names and types. These tables show where each function of the Windows Forms controls is found.
| MaskedTextBox | SftMask/NET |
|---|---|
| Mask | SftMask.Mask, in the SftMask mask syntax. The MaskedTextBox characters 0, 9, L, ?, &, C, A, a and \ correspond to #, 9, ?, @, &, ~, A, a and \; the case conversions <, > and | to <l, <u and >; the placeholders $, : and / to the culture tokens |, : and /; and the placeholders #, . and , (an optional digit or sign, the decimal separator and the group separator) to numeric fields. |
| Text, TextLength, TextMaskFormat, CutCopyMaskFormat | SftMask.Text, SftMask.TextLength, SftMask.TextFormat, SftMask.ClipboardFormat (TextFormatEnum), SftMask.TextWithLiterals, SftMask.TextNoLiterals, SftMask.GetText |
| MaskCompleted, MaskFull | SftMask.IsComplete, SftMask.IsFull, SftMask.IsEmpty, SftMask.IsValid |
| MaskedTextProvider | SftMask.Positions, SftMask.Values |
| PromptChar, HidePromptOnLeave | SftMask.PromptChar, SftMask.ShowPromptNoFocus, SftMask.PromptUnderline, SftMask.PromptUnderlineNoFocus |
| AllowPromptAsInput, AsciiOnly, BeepOnError, RejectInputOnFirstFailure, ResetOnPrompt, ResetOnSpace, SkipLiterals | The properties of the same names. |
| InsertKeyMode, IsOverwriteMode, IsOverwriteModeChanged | SftMask.InputMode (InputModeEnum), SftMask.Overtype, SftMask.InputModeChanged |
| PasswordChar, UseSystemPasswordChar | The properties of the same names, and <p blocks in the mask. |
| ValidatingType, ValidateText, TypeValidationCompleted | The members of the same names, and SftMask.IsValid, SftMask.ValidateContents, SftMask.CustomValidation and SftMask.ValidationError |
| MaskInputRejected, MaskChanged | SftMask.InputRejected (with the reason in InputRejectedEventArgs.Reason), SftMask.MaskChanged |
| Culture, FormatProvider | SftMask.Culture |
| Undo, ClearUndo, CanUndo, Modified, ModifiedChanged | The members of the same names; Undo keeps up to 16 changes. |
| Copy, Cut, Paste, Clear, Select, SelectAll, DeselectAll, SelectionStart, SelectionLength, SelectedText, HideSelection, ShortcutsEnabled | The members of the same names, and SftMask.PrePaste |
| AppendText | SftMask.SelectedText, after SftMask.Select has placed the caret at the end |
| GetCharFromPosition, GetCharIndexFromPosition, GetPositionFromCharIndex | SftMask.GetCharIndexFromPosition with SftMask.Positions for the character, SftMask.GetPositionFromCharIndex, SftMask.GetCharBounds and SftMask.HitTest |
| MaxLength, ReadOnly, TextAlign, BorderStyle | The properties of the same names. |
| BorderStyleChanged, HideSelectionChanged, ReadOnlyChanged, TextAlignChanged | SftMask.PropertyChanged, with the name of the property |
| NumericUpDown | SftMask/NET |
|---|---|
| Value, ValueChanged | SftMask.Value (a nullable decimal, the first numeric field), SftMask.ValueChanged, SftMask.Values for further fields |
| Minimum, Maximum | The range of the numeric field in the mask, such as $^-,6.2(-5000,5000) |
| DecimalPlaces, ThousandsSeparator, Hexadecimal | The fraction digits, the , subtoken and $X fields of the mask |
| Increment, Accelerations | SftMask.SpinIncrement, SftMask.SpinAccelerations |
| UpButton, DownButton | SftMask.SpinUp, SftMask.SpinDown, SftMask.UpDownPress |
| UpDownAlign, InterceptArrowKeys | SftMask.UpDownAlign, SftMask.SpinArrowKeys, and SftMask.ButtonStyle to show the buttons |
| ReadOnly, TextAlign | The properties of the same names (a read-only SftMask control also disables its buttons and spinning), and SftMask.ReadOnlyUpDown to disable only the buttons |
| BeginInit, EndInit | SftMask.Initializing; the control also implements ISupportInitialize |
A numeric field spun past an end of its range wraps around to the other end; the N subtoken makes it stop at the ends as the NumericUpDown control does.