RegexStateTrigger 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.
Enables a state if the regex expression is true for a given string value
public class RegexStateTrigger : Windows.UI.Xaml.StateTriggerBase
type RegexStateTrigger = class
inherit StateTriggerBase
Public Class RegexStateTrigger
Inherits StateTriggerBase
- Inheritance
-
Windows.UI.Xaml.StateTriggerBaseRegexStateTrigger
Remarks
Example: Trigger user entered a valid email
<triggers:RegexStateTrigger Value="{x:Bind myTextBox.Text}" Expression="^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$" Options="IgnoreCase" />
Constructors
RegexStateTrigger() |
Fields
ExpressionProperty |
Identifies the Expression DependencyProperty |
OptionsProperty |
Identifies the Options DependencyProperty |
ValueProperty |
Identifies the Value DependencyProperty |
Properties
Expression |
Gets or sets the regular expression. |
Options |
Gets or sets the regular expression options |
Value |
Gets or sets the value for regex evaluation. |