Class RadMaskedEditBox
Uses a mask to distinguish between proper and improper user input
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
[TelerikToolboxCategory("Editors")]
public class RadMaskedEditBox : RadEditorControl, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IPCHost, IAnalyticsProvider, ISupportRootUIAutomation
Constructors
RadMaskedEditBox()
Properties
AcceptsReturn
Gets or sets a value indicating whether pressing ENTER in a multiline control creates a new line of text in the control or activates the default button for the form.
Declaration
[RadDefaultValue("AcceptsReturn", typeof(RadTextBoxItem))]
public bool AcceptsReturn { get; set; }
Property Value
System.Boolean
|
AcceptsTab
Gets or sets a value indicating whether pressing the TAB key in a multiline text box control types a TAB character in the control instead of moving the focus to the next control in the tab order.
Declaration
[RadDefaultValue("AcceptsTab", typeof(RadTextBoxItem))]
public bool AcceptsTab { get; set; }
Property Value
System.Boolean
|
AllowPromptAsInput
Gets or sets a value indicating whether the prompt character can be entered as input.
Declaration
public bool AllowPromptAsInput { get; set; }
Property Value
System.Boolean
|
AutoCompleteCustomSource
Gets or sets a custom System.Windows.Forms.AutoCompleteStringCollection to use when the AutoCompleteSource property is set to CustomSource.
Declaration
[RadDefaultValue("AutoCompleteCustomSource", typeof(HostedTextBoxBase))]
public AutoCompleteStringCollection AutoCompleteCustomSource { get; set; }
Property Value
System.Windows.Forms.AutoCompleteStringCollection
|
AutoCompleteMode
Gets or sets an option that controls how automatic completion works for the TextBox.
Declaration
[RadDefaultValue("AutoCompleteMode", typeof(HostedTextBoxBase))]
public AutoCompleteMode AutoCompleteMode { get; set; }
Property Value
System.Windows.Forms.AutoCompleteMode
|
AutoCompleteSource
Gets or sets a value specifying the source of complete strings used for automatic completion.
Declaration
[RadDefaultValue("AutoCompleteSource", typeof(HostedTextBoxBase))]
public AutoCompleteSource AutoCompleteSource { get; set; }
Property Value
System.Windows.Forms.AutoCompleteSource
|
AutoSize
Gets or sets whether the edit control is auto-sized
Declaration
public override bool AutoSize { get; set; }
Property Value
System.Boolean
|
Overrides
CharacterCasing
Gets or sets a value indicating whether the control modifies the case of characters as they are typed.
Declaration
public CharacterCasing CharacterCasing { get; set; }
Property Value
System.Windows.Forms.CharacterCasing
|
Culture
Gets or sets the culture that determines the value of the localizable separators and placeholders in the input mask.
Declaration
public CultureInfo Culture { get; set; }
Property Value
System.Globalization.CultureInfo
|
DefaultSize
Gets the default size for the control.
Declaration
protected override Size DefaultSize { get; }
Property Value
System.Drawing.Size
|
EnableNullValueInput
Gets or sets a value indicating whether end users can set the value to NULL. This can be achieved by pressing Ctrl + Del or Ctrl + 0 key combinations.
Declaration
public virtual bool EnableNullValueInput { get; set; }
Property Value
System.Boolean
|
EnableUIAutomation
Gets or sets a value indicating whether the UI Automation functionality is enabled or disabled for this control.
Declaration
public override bool EnableUIAutomation { get; set; }
Property Value
System.Boolean
|
Overrides
Implements
HideSelection
Gets or sets a value indicating whether the selected text remains highlighted even when the control has lost the focus.
Declaration
public bool HideSelection { get; set; }
Property Value
System.Boolean
|
Lines
Gets or sets the lines of text in multiline configurations.
Declaration
public string[] Lines { get; set; }
Property Value
System.String[]
|
Mask
Gets or sets a mask expression.
Declaration
public string Mask { get; set; }
Property Value
System.String
|
MaskedEditBoxElement
Gets or sets the RadMaskedEditBoxElement that represents the element hierarchy.
Declaration
public virtual RadMaskedEditBoxElement MaskedEditBoxElement { get; set; }
Property Value
RadMaskedEditBoxElement
|
MaskType
Gets or sets the mask type.
Declaration
public MaskType MaskType { get; set; }
Property Value
MaskType
|
Modified
Gets or sets a value indicating whether the RadMaskedEditBox control has been modified by the user since the control was created or since its contents were last set.
Declaration
public bool Modified { get; set; }
Property Value
System.Boolean
|
Multiline
Gets or sets a value indicating whether this is a multiline TextBox control.
Declaration
[RadDefaultValue("Multiline", typeof(RadTextBoxItem))]
public bool Multiline { get; set; }
Property Value
System.Boolean
|
Name
Gets or sets the name of the control, which is used by the hosted control.
Declaration
public string Name { get; set; }
Property Value
System.String
|
NullText
Gets or sets the text that is displayed when the control contains a null reference.
Declaration
[RadDefaultValue("NullText", typeof(RadTextBoxItem))]
public string NullText { get; set; }
Property Value
System.String
|
PasswordChar
Gets or sets the character used to mask characters of a password in a single-line TextBox control.
Declaration
[RadDefaultValue("PasswordChar", typeof(RadTextBoxItem))]
public char PasswordChar { get; set; }
Property Value
System.Char
|
PromptChar
Gets or sets the character used to represent the absence of user input in the mask.
Declaration
public char PromptChar { get; set; }
Property Value
System.Char
|
ReadOnly
Gets or sets a value indicating whether the contents of the TextBox control can be changed.
Declaration
public bool ReadOnly { get; set; }
Property Value
System.Boolean
|
ScrollBars
Gets or sets which scroll bars should appear in a multiline TextBox control.
Declaration
public ScrollBars ScrollBars { get; set; }
Property Value
System.Windows.Forms.ScrollBars
|
SelectedText
Gets or sets a value indicating the currently selected text in the control.
Declaration
public string SelectedText { get; set; }
Property Value
System.String
|
SelectionLength
Gets or sets the number of characters selected in the text box.
Declaration
public int SelectionLength { get; set; }
Property Value
System.Int32
|
SelectionStart
Gets or sets the starting point of text selected in the text box.
Declaration
public int SelectionStart { get; set; }
Property Value
System.Int32
|
ShortcutsEnabled
Gets or sets a value indicating whether the defined shortcuts are enabled.
Declaration
public bool ShortcutsEnabled { get; set; }
Property Value
System.Boolean
|
Text
Gets or sets the text associated with this control.
Declaration
public override string Text { get; set; }
Property Value
System.String
|
Overrides
TextAlign
Gets or sets the horizontal alignment of the text.
Declaration
public HorizontalAlignment TextAlign { get; set; }
Property Value
System.Windows.Forms.HorizontalAlignment
|
TextMaskFormat
Gets or sets a value that determines whether literals and prompt characters are included in the formatted string.
Declaration
public MaskFormat TextMaskFormat { get; set; }
Property Value
System.Windows.Forms.MaskFormat
|
UseGenericBorderPaint
Gets or sets a value indicating whether to show the bottom part of characters, clipped due to font name or size particularities.
Declaration
[RadDescription("UseGenericBorderPaint", typeof(RadTextBoxElement))]
[RadDefaultValue("UseGenericBorderPaint", typeof(RadTextBoxElement))]
public bool UseGenericBorderPaint { get; set; }
Property Value
System.Boolean
|
Value
Gets or sets the value associated to the mask edit box
Declaration
public object Value { get; set; }
Property Value
System.Object
|
Methods
Clear()
Clears all text from the text box control and Value.
Declaration
public void Clear()
ClearUndo()
Clears information about the most recent operation from the undo buffer of the text box.
Declaration
public void ClearUndo()
CreateAccessibilityInstance()
Creates the accessibility instance for the control.
Declaration
protected override AccessibleObject CreateAccessibilityInstance()
Returns
System.Windows.Forms.AccessibleObject
A new instance of the accessibility object for this control. |
CreateChildItems(RadElement)
Creates the child items in the element hierarchy.
Declaration
protected override void CreateChildItems(RadElement parent)
Parameters
RadElement
parent
The parent element to which child items will be added. |
Overrides
CreateElement()
Creates the RadMaskedEditBoxElement that represents the core functionality of the control.
Declaration
protected virtual RadMaskedEditBoxElement CreateElement()
Returns
RadMaskedEditBoxElement
A new instance of RadMaskedEditBoxElement. |
Dispose(Boolean)
Releases the unmanaged resources used by the RadMaskedEditBox and optionally releases the managed resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
System.Boolean
disposing
true to release both managed and unmanaged resources; false to release only unmanaged resources. |
Overrides
Focus()
Sets input focus to the control.
Declaration
public void Focus()
OnKeyDown(Object, KeyEventArgs)
Raises the KeyDown event.
Declaration
public virtual void OnKeyDown(object sender, KeyEventArgs e)
Parameters
System.Object
sender
The source of the event. |
System.Windows.Forms.KeyEventArgs
e
A System.Windows.Forms.KeyEventArgs that contains the event data. |
OnKeyPress(Object, KeyPressEventArgs)
Raises the KeyPress event.
Declaration
public virtual void OnKeyPress(object sender, KeyPressEventArgs e)
Parameters
System.Object
sender
The source of the event. |
System.Windows.Forms.KeyPressEventArgs
e
A System.Windows.Forms.KeyPressEventArgs that contains the event data. |
OnKeyUp(Object, KeyEventArgs)
Raises the KeyUp event.
Declaration
public virtual void OnKeyUp(object sender, KeyEventArgs e)
Parameters
System.Object
sender
The source of the event. |
System.Windows.Forms.KeyEventArgs
e
A System.Windows.Forms.KeyEventArgs that contains the event data. |
OnMultilineChanged(Object, EventArgs)
Raises the MultilineChanged event.
Declaration
public virtual void OnMultilineChanged(object sender, EventArgs e)
Parameters
System.Object
sender
The source of the event. |
System.EventArgs
e
An System.EventArgs that contains the event data. |
OnTextAlignChanged(Object, EventArgs)
Raises the TextAlignChanged event.
Declaration
public virtual void OnTextAlignChanged(object sender, EventArgs e)
Parameters
System.Object
sender
The source of the event. |
System.EventArgs
e
An System.EventArgs that contains the event data. |
OnValueChanged(Object, EventArgs)
Raises the ValueChanged event.
Declaration
protected virtual void OnValueChanged(object sender, EventArgs e)
Parameters
System.Object
sender
The source of the event. |
System.EventArgs
e
An System.EventArgs that contains the event data. |
OnValueChanging(Object, CancelEventArgs)
Fires the ValueChanging event
Declaration
protected virtual void OnValueChanging(object sender, CancelEventArgs e)
Parameters
System.Object
sender
|
System.ComponentModel.CancelEventArgs
e
|
ProcessAutoSizeChanged(Boolean)
Processes auto-size changes.
Declaration
protected override void ProcessAutoSizeChanged(bool value)
Parameters
System.Boolean
value
true if auto-sizing is enabled; otherwise, false. |
Overrides
ResetBackColorThemeOverrides()
Resets background color theme overrides for the control.
Declaration
protected override void ResetBackColorThemeOverrides()
Overrides
ResetForeColorThemeOverrides()
Resets foreground color theme overrides for the control.
Declaration
protected override void ResetForeColorThemeOverrides()
Overrides
Select()
Activates the control.
Declaration
public void Select()
SelectAll()
Selects all text in the control.
Declaration
public void SelectAll()
SetBackColorThemeOverrides()
Sets background color theme overrides for the control.
Declaration
protected override void SetBackColorThemeOverrides()
Overrides
SetForeColorThemeOverrides()
Sets foreground color theme overrides for the control.
Declaration
protected override void SetForeColorThemeOverrides()
Overrides
UnwireEvents()
Unwires the event handlers for the masked edit box element.
Declaration
protected void UnwireEvents()
WireEvents()
Wires the necessary event handlers for the masked edit box element.
Declaration
protected void WireEvents()
WndProc(ref Message)
Processes Windows messages.
Declaration
protected override void WndProc(ref Message m)
Parameters
System.Windows.Forms.Message
m
The Windows System.Windows.Forms.Message to process. |
Overrides
Events
Click
Occurs when the element is clicked.
Declaration
public event EventHandler Click
Event Type
System.EventHandler
|
KeyDown
Occurs when a key is pressed down while the control has focus.
Declaration
public event KeyEventHandler KeyDown
Event Type
System.Windows.Forms.KeyEventHandler
|
KeyPress
Occurs when a character, space or backspace key is pressed while the control has focus.
Declaration
public event KeyPressEventHandler KeyPress
Event Type
System.Windows.Forms.KeyPressEventHandler
|
KeyUp
Occurs when a key is released while the control has focus.
Declaration
public event KeyEventHandler KeyUp
Event Type
System.Windows.Forms.KeyEventHandler
|
MultilineChanged
Occurs when the value of the Multiline property has changed.
Declaration
public event EventHandler MultilineChanged
Event Type
System.EventHandler
|
TextAlignChanged
Occurs when the value of the TextAlign property has changed.
Declaration
public event EventHandler TextAlignChanged
Event Type
System.EventHandler
|
ValueChanged
Occurs when the editing value has been changed.
Declaration
public event EventHandler ValueChanged
Event Type
System.EventHandler
|
ValueChanging
Occurs when the editing value is changing.
Declaration
public event CancelEventHandler ValueChanging
Event Type
System.ComponentModel.CancelEventHandler
|
Explicit Interface Implementations
ISupportRootUIAutomation.DisposeUIAutomationProvider()
Clears the UI Automation provider for this control.
Declaration
void ISupportRootUIAutomation.DisposeUIAutomationProvider()
Implements
ISupportRootUIAutomation.InitializeUIAutomationProvider()
Creates the UI Automation provider for this control.
Declaration
void ISupportRootUIAutomation.InitializeUIAutomationProvider()
Implements
ISupportRootUIAutomation.RootUIAutomationManager
Gets the UI Automation Manager.
Declaration
IRootUIAutomationManager ISupportRootUIAutomation.RootUIAutomationManager { get; }
Returns
IRootUIAutomationManager
|
Implements
ISupportRootUIAutomation.UIAutomationProvider
Gets the UI Automation Provider.
Declaration
IRadRawElementProviderFragmentRoot ISupportRootUIAutomation.UIAutomationProvider { get; }
Returns
IRadRawElementProviderFragmentRoot
|