RadMaskedEditBox
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
Initializes a new instance of the RadMaskedEditBox class.
public RadMaskedEditBox()
Properties
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.
public bool AcceptsReturn { get; set; }
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.
public bool AcceptsTab { get; set; }
Gets or sets a value indicating whether the prompt character can be entered as input.
public bool AllowPromptAsInput { get; set; }
Gets or sets a custom AutoCompleteStringCollection to use when the AutoCompleteSource property is set to CustomSource.
[Browsable(true)]
public AutoCompleteStringCollection AutoCompleteCustomSource { get; set; }
Gets or sets an option that controls how automatic completion works for the TextBox.
[Browsable(true)]
public AutoCompleteMode AutoCompleteMode { get; set; }
Gets or sets a value specifying the source of complete strings used for automatic completion.
[Browsable(true)]
[TypeConverter(typeof(TextBoxAutoCompleteSourceConverter))]
public AutoCompleteSource AutoCompleteSource { get; set; }
Gets or sets whether the edit control is auto-sized
[Browsable(true)]
public override bool AutoSize { get; set; }
Overrides:
Gets or sets a value indicating whether the control modifies the case of characters as they are typed.
public CharacterCasing CharacterCasing { get; set; }
Gets or sets the culture that determines the value of the localizable separators and placeholders in the input mask.
public CultureInfo Culture { get; set; }
Gets the default size for the control.
protected override Size DefaultSize { get; }
Overrides:
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.
public virtual bool EnableNullValueInput { get; set; }
Gets or sets a value indicating whether the UI Automation functionality is enabled or disabled for this control.
public override bool EnableUIAutomation { get; set; }
Overrides:
Implements:
Gets or sets a value indicating whether the selected text remains highlighted even when the control has lost the focus.
public bool HideSelection { get; set; }
Gets or sets the lines of text in multiline configurations.
public string[] Lines { get; set; }
Gets or sets the RadMaskedEditBoxElement that represents the element hierarchy.
[Browsable(false)]
public virtual RadMaskedEditBoxElement MaskedEditBoxElement { get; set; }
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.
public bool Modified { get; set; }
Gets or sets a value indicating whether this is a multiline TextBox control.
public bool Multiline { get; set; }
Gets or sets the name of the control, which is used by the hosted control.
public string Name { get; set; }
Gets or sets the text that is displayed when the control contains a null reference.
public string NullText { get; set; }
Gets or sets the character used to mask characters of a password in a single-line TextBox control.
public char PasswordChar { get; set; }
Gets or sets the character used to represent the absence of user input in the mask.
public char PromptChar { get; set; }
Gets or sets a value indicating whether the contents of the TextBox control can be changed.
public bool ReadOnly { get; set; }
Gets or sets which scroll bars should appear in a multiline TextBox control.
public ScrollBars ScrollBars { get; set; }
Gets or sets a value indicating the currently selected text in the control.
public string SelectedText { get; set; }
Gets or sets the number of characters selected in the text box.
public int SelectionLength { get; set; }
Gets or sets the starting point of text selected in the text box.
public int SelectionStart { get; set; }
Gets or sets a value indicating whether the defined shortcuts are enabled.
public bool ShortcutsEnabled { get; set; }
Gets or sets the text associated with this control.
[Browsable(true)]
[Bindable(true)]
[SettingsBindable(true)]
public override string Text { get; set; }
Overrides:
Gets or sets the horizontal alignment of the text.
[Browsable(true)]
public HorizontalAlignment TextAlign { get; set; }
Gets or sets a value that determines whether literals and prompt characters are included in the formatted string.
[Browsable(true)]
public MaskFormat TextMaskFormat { get; set; }
Gets or sets a value indicating whether to show the bottom part of characters, clipped due to font name or size particularities.
public bool UseGenericBorderPaint { get; set; }
Methods
Clears all text from the text box control and Value.
public void Clear()
Clears information about the most recent operation from the undo buffer of the text box.
public void ClearUndo()
Creates the accessibility instance for the control.
protected override AccessibleObject CreateAccessibilityInstance()
A new instance of the accessibility object for this control.
Overrides:
Creates the child items in the element hierarchy.
protected override void CreateChildItems(RadElement parent)
The parent element to which child items will be added.
Overrides:
Creates the RadMaskedEditBoxElement that represents the core functionality of the control.
protected virtual RadMaskedEditBoxElement CreateElement()
A new instance of RadMaskedEditBoxElement.
Releases the unmanaged resources used by the RadMaskedEditBox and optionally releases the managed resources.
protected override void Dispose(bool disposing)
true to release both managed and unmanaged resources; false to release only unmanaged resources.
Overrides:
Sets input focus to the control.
public void Focus()
Raises the KeyDown event.
public virtual void OnKeyDown(object sender, KeyEventArgs e)
The source of the event.
eKeyEventArgsA KeyEventArgs that contains the event data.
Raises the KeyPress event.
public virtual void OnKeyPress(object sender, KeyPressEventArgs e)
The source of the event.
eKeyPressEventArgsA KeyPressEventArgs that contains the event data.
Raises the KeyUp event.
public virtual void OnKeyUp(object sender, KeyEventArgs e)
The source of the event.
eKeyEventArgsA KeyEventArgs that contains the event data.
Raises the MultilineChanged event.
Raises the TextAlignChanged event.
Raises the ValueChanged event.
Fires the ValueChanging event
protected virtual void OnValueChanging(object sender, CancelEventArgs e)
Processes auto-size changes.
protected override void ProcessAutoSizeChanged(bool value)
true if auto-sizing is enabled; otherwise, false.
Overrides:
Resets background color theme overrides for the control.
protected override void ResetBackColorThemeOverrides()
Overrides:
Resets foreground color theme overrides for the control.
protected override void ResetForeColorThemeOverrides()
Overrides:
Activates the control.
public void Select()
Selects all text in the control.
public void SelectAll()
Sets background color theme overrides for the control.
protected override void SetBackColorThemeOverrides()
Overrides:
Sets foreground color theme overrides for the control.
protected override void SetForeColorThemeOverrides()
Overrides:
Unwires the event handlers for the masked edit box element.
protected void UnwireEvents()
Wires the necessary event handlers for the masked edit box element.
protected void WireEvents()
Events
Occurs when the element is clicked.
[Browsable(true)]
public event EventHandler Click
Occurs when the element is double clicked.
[Browsable(true)]
public event EventHandler DoubleClick
Occurs when a key is pressed down while the control has focus.
public event KeyEventHandler KeyDown
Occurs when a character, space or backspace key is pressed while the control has focus.
public event KeyPressEventHandler KeyPress
Occurs when a key is released while the control has focus.
public event KeyEventHandler KeyUp
Occurs when the value of the Multiline property has changed.
[Browsable(true)]
public event EventHandler MultilineChanged
Occurs when the value of the TextAlign property has changed.
[Browsable(true)]
public event EventHandler TextAlignChanged
Occurs when the editing value has been changed.
public event EventHandler ValueChanged
Occurs when the editing value is changing.
public event CancelEventHandler ValueChanging