New to Telerik UI for WinFormsStart a free 30-day trial

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
public class RegexMaskTextBoxProvider : IMaskProvider

Inheritance: objectRegexMaskTextBoxProvider

Derived Classes: EMailMaskTextBoxProvider

Implements: IMaskProvider

Constructors

Initializes a new instance of the RegexMaskTextBoxProvider class.

C#
public RegexMaskTextBoxProvider(string mask, CultureInfo culture, RadMaskedEditBoxElement owner)
Parameters:maskstring

The mask.

cultureCultureInfo

The culture.

ownerRadMaskedEditBoxElement

The owner.

Fields

C#
protected Regex regex

Properties

Gets or sets a value indicting whether empty strings are valid.

C#
public bool AllowEmptyString { get; set; }

Gets the culture that determines the value of the localizable separators and placeholders in the input mask.

C#
public CultureInfo Culture { get; }
Property Value:

A System.Globalization.CultureInfo containing the culture information associated with the input mask.

Implements: IMaskProvider.Culture

Gets or sets the error message.

C#
public string ErrorMessage { get; set; }

Gets or sets the error provider.

C#
public ErrorProvider ErrorProvider { get; set; }

Gets a value indicating whether the text matches the regular expression created using the Mask Sets an error if there is no match and is true.

C#
public bool IsValid { get; }

Gets the input mask.

C#
public string Mask { get; }
Property Value:

A string containing the full mask.

Implements: IMaskProvider.Mask

TextBoxItem

RadTextBoxItem

Gets the text box item.

C#
public RadTextBoxItem TextBoxItem { get; }

Implements: IMaskProvider.TextBoxItem

Gets or sets the value.

C#
public object Value { get; set; }

Implements: IMaskProvider.Value

Methods

Clones this instance.

C#
public IMaskProvider Clone()
Returns:

IMaskProvider

The cloned instance.

Implements: IMaskProvider.Clone()

Occurs when a key is pressed.

C#
public void KeyDown(object sender, KeyEventArgs e)
Parameters:senderobject

The sender.

eKeyEventArgs

Key event arguments.

Implements: IMaskProvider.KeyDown(object, KeyEventArgs)

Occurs when a key is pressed.

C#
public void KeyPress(object sender, KeyPressEventArgs e)
Parameters:senderobject

The sender.

eKeyPressEventArgs

Key event arguments.

Implements: IMaskProvider.KeyPress(object, KeyPressEventArgs)

Returns the formatted string.

C#
public string ToString(bool includePrompt, bool includeLiterals)
Parameters:includePromptbool

Not used.

includeLiteralsbool

Not used.

Returns:

string

The formatted System.String that includes all the assigned character values.

Implements: IMaskProvider.ToString(bool, bool)

Detaches from events.

C#
public void UnwireEvents()

Validates the given string value and applies it as if the value is valid.

C#
public bool Validate(string value)
Parameters:valuestring

THe string value that is about to be set.

Returns:

bool

A value indicating whether the string value is valid.

Implements: IMaskProvider.Validate(string)

Attaches to events.

C#
public void WireEvents()