ClassRadMaskedEditBox
Uses a mask to distinguish between proper and improper user input
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
[TelerikToolboxCategory("Editors")]
[DefaultBindingProperty("Text")]
public class RadMaskedEditBox : RadEditorControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IAnalyticsProvider, ISupportRootUIAutomation
Inheritance: objectMarshalByRefObjectComponentControlScrollableControlRadControlRadEditorControlRadMaskedEditBox
Implements:
Inherited Members
Constructors
RadMaskedEditBox()
Initializes a new instance of the RadMaskedEditBox class.
Declaration
public 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.
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.
AllowPromptAsInput
Gets or sets a value indicating whether the prompt character can be entered as input.
AutoCompleteCustomSource
Gets or sets a custom AutoCompleteStringCollection to use when the AutoCompleteSource property is set to CustomSource.
Declaration
[Browsable(true)]
public AutoCompleteStringCollection AutoCompleteCustomSource { get; set; }
Property Value
AutoCompleteMode
Gets or sets an option that controls how automatic completion works for the TextBox.
Declaration
[Browsable(true)]
public AutoCompleteMode AutoCompleteMode { get; set; }
Property Value
AutoCompleteSource
Gets or sets a value specifying the source of complete strings used for automatic completion.
Declaration
[Browsable(true)]
[TypeConverter(typeof(TextBoxAutoCompleteSourceConverter))]
public AutoCompleteSource AutoCompleteSource { get; set; }
Property Value
AutoSize
Gets or sets whether the edit control is auto-sized
Declaration
[Browsable(true)]
public override bool AutoSize { get; set; }
Property Value
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
Culture
Gets or sets the culture that determines the value of the localizable separators and placeholders in the input mask.
DefaultSize
Gets the default size for the control.
Declaration
protected override Size DefaultSize { get; }
Property Value
Overrides
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
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
Overrides
Implements
HideSelection
Gets or sets a value indicating whether the selected text remains highlighted even when the control has lost the focus.
Lines
Gets or sets the lines of text in multiline configurations.
Mask
Gets or sets a mask expression.
MaskType
Gets or sets the mask type.
MaskedEditBoxElement
Gets or sets the RadMaskedEditBoxElement that represents the element hierarchy.
Declaration
[Browsable(false)]
public virtual RadMaskedEditBoxElement MaskedEditBoxElement { get; set; }
Property Value
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.
Multiline
Gets or sets a value indicating whether this is a multiline TextBox control.
Name
Gets or sets the name of the control, which is used by the hosted control.
NullText
Gets or sets the text that is displayed when the control contains a null reference.
PasswordChar
Gets or sets the character used to mask characters of a password in a single-line TextBox control.
PromptChar
Gets or sets the character used to represent the absence of user input in the mask.
ReadOnly
Gets or sets a value indicating whether the contents of the TextBox control can be changed.
ScrollBars
Gets or sets which scroll bars should appear in a multiline TextBox control.
SelectedText
Gets or sets a value indicating the currently selected text in the control.
SelectionLength
Gets or sets the number of characters selected in the text box.
SelectionStart
Gets or sets the starting point of text selected in the text box.
ShortcutsEnabled
Gets or sets a value indicating whether the defined shortcuts are enabled.
Text
Gets or sets the text associated with this control.
Declaration
[Browsable(true)]
[Bindable(true)]
[SettingsBindable(true)]
public override string Text { get; set; }
Property Value
Overrides
TextAlign
Gets or sets the horizontal alignment of the text.
Declaration
[Browsable(true)]
public HorizontalAlignment TextAlign { get; set; }
Property Value
TextMaskFormat
Gets or sets a value that determines whether literals and prompt characters are included in the formatted string.
Declaration
[Browsable(true)]
public MaskFormat TextMaskFormat { get; set; }
Property Value
UseGenericBorderPaint
Gets or sets a value indicating whether to show the bottom part of characters, clipped due to font name or size particularities.
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
A new instance of the accessibility object for this control.
Overrides
CreateChildItems(RadElement)
Creates the child items in the element hierarchy.
Declaration
protected override void CreateChildItems(RadElement parent)
Parameters
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
A new instance of RadMaskedEditBoxElement.
Dispose(bool)
Releases the unmanaged resources used by the RadMaskedEditBox and optionally releases the managed resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
disposing
true to release both managed and unmanaged resources; false to release only unmanaged resources.
Overrides
OnKeyDown(object, KeyEventArgs)
Raises the KeyDown event.
Declaration
public virtual void OnKeyDown(object sender, KeyEventArgs e)
Parameters
sender
The source of the event.
e
A KeyEventArgs that contains the event data.
OnKeyPress(object, KeyPressEventArgs)
Raises the KeyPress event.
Declaration
public virtual void OnKeyPress(object sender, KeyPressEventArgs e)
Parameters
sender
The source of the event.
e
A KeyPressEventArgs that contains the event data.
OnKeyUp(object, KeyEventArgs)
Raises the KeyUp event.
Declaration
public virtual void OnKeyUp(object sender, KeyEventArgs e)
Parameters
sender
The source of the event.
e
A KeyEventArgs that contains the event data.
OnMultilineChanged(object, EventArgs)
Raises the MultilineChanged event.
OnTextAlignChanged(object, EventArgs)
Raises the TextAlignChanged event.
OnValueChanged(object, EventArgs)
Raises the ValueChanged event.
OnValueChanging(object, CancelEventArgs)
Fires the ValueChanging event
Declaration
protected virtual void OnValueChanging(object sender, CancelEventArgs e)
Parameters
sender
e
ProcessAutoSizeChanged(bool)
Processes auto-size changes.
Declaration
protected override void ProcessAutoSizeChanged(bool value)
Parameters
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
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.
Events
Click
Occurs when the element is clicked.
Declaration
[Browsable(true)]
public event EventHandler Click
Event Value
DoubleClick
Occurs when the element is double clicked.
Declaration
[Browsable(true)]
public event EventHandler DoubleClick
Event Value
KeyDown
Occurs when a key is pressed down while the control has focus.
KeyPress
Occurs when a character, space or backspace key is pressed while the control has focus.
Declaration
public event KeyPressEventHandler KeyPress
Event Value
KeyUp
Occurs when a key is released while the control has focus.
MultilineChanged
Occurs when the value of the Multiline property has changed.
Declaration
[Browsable(true)]
public event EventHandler MultilineChanged
Event Value
TextAlignChanged
Occurs when the value of the TextAlign property has changed.
Declaration
[Browsable(true)]
public event EventHandler TextAlignChanged
Event Value
ValueChanged
Occurs when the editing value has been changed.
ValueChanging
Occurs when the editing value is changing.
Declaration
public event CancelEventHandler ValueChanging
Event Value