TextBoxRegex Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
TextBoxRegex allows text validation using a regular expression.
public class TextBoxRegex
type TextBoxRegex = class
Public Class TextBoxRegex
- Inheritance
-
TextBoxRegex
Remarks
If is set to Normal then IsValid will be set according to whether the regex is valid. If is set to Forced then IsValid will be set according to whether the regex is valid, when TextBox lose focus and in case the textbox is invalid clear its value. If is set to Dynamic then IsValid will be set according to whether the regex is valid. If the newest charachter is invalid, only invalid character of the Textbox will be deleted.
Constructors
TextBoxRegex() |
Fields
IsValidProperty |
Identifies the IsValid attached dependency property. |
RegexProperty |
Identifies the Regex attached dependency property. |
ValidationModeProperty |
Identifies the ValidationMode attached dependency property. |
ValidationTypeProperty |
Identifies the ValidationType attached dependency property. |
Attached Properties
IsValid | |
Regex | |
ValidationMode | |
ValidationType |
Methods
GetIsValid(TextBox) |
Gets the value of the TextBoxRegex.IsValid XAML attached property from the specified TextBox. |
GetRegex(TextBox) |
Gets the value of the TextBoxRegex.Regex XAML attached property from the specified TextBox. |
GetValidationMode(TextBox) |
Gets the value of the TextBoxRegex.ValidationMode XAML attached property from the specified TextBox. |
GetValidationType(TextBox) |
Gets the value of the TextBoxRegex.ValidationType XAML attached property from the specified TextBox. |
SetIsValid(TextBox, Boolean) |
Sets the value of the TextBoxRegex.IsValid XAML attached property for a target TextBox. |
SetRegex(TextBox, String) |
Sets the value of the TextBoxRegex.Regex XAML attached property for a target TextBox. |
SetValidationMode(TextBox, TextBoxRegex+ValidationMode) |
Sets the value of the TextBoxRegex.ValidationMode XAML attached property for a target TextBox. |
SetValidationType(TextBox, TextBoxRegex+ValidationType) |
Sets the value of the TextBoxRegex.ValidationType XAML attached property for a target TextBox. |