CommandBarTextBox
Represents a text box in CommandBarStripElement.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class CommandBarTextBox : RadCommandBarBaseItem, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementRadCommandBarVisualElementRadCommandBarBaseItemCommandBarTextBox...
Implements:
Inherited Members
Constructors
public CommandBarTextBox()
Properties
Gets or sets the prompt text that is displayed when the text box contains no text.
public string NullText { get; set; }
Gets or sets the color of prompt text that is displayed when the text box contains no text.
public Color NullTextColor { get; set; }
Gets or sets the character used to mask characters of a password in a single-line text box. control.
public char PasswordChar { get; set; }
Gets or sets the number of characters selected in the text box.
[Browsable(false)]
public int SelectionLength { get; set; }
Gets or sets the starting point of text selected in the text box.
[Browsable(false)]
public int SelectionStart { get; set; }
Gets or sets a value indicating whether the clear button is shown.
public bool ShowClearButton { get; set; }
Gets or sets the text associated with this item.
[Bindable(true)]
[SettingsBindable(true)]
public override string Text { get; set; }
Overrides:
Gets or sets the hosted RadTextBoxElement.
public RadTextBoxElement TextBoxElement { get; set; }
Indicates whether the item should be drawn in the strip.
[Browsable(true)]
public override bool VisibleInStrip { get; set; }
Overrides:
Methods
Appends text to the current text of a text box.
public void AppendText(string text)
The text to append to the current contents of the text box.
Clears all text from the text box control.
public void Clear()
Clears information about the most recent operation from the undo buffer of the text box.
public void ClearUndo()
Copies the current selection in the text box to the Clipboard.
public void Copy()
Called by the element when constructed. Allows inheritors to build the element tree.
protected override void CreateChildElements()
Overrides:
Moves the current selection in the text box to the Clipboard.
public void Cut()
Specifies that the value of the SelectionLength property is zero so that no characters are selected in the control.
public void DeselectAll()
Retrieves the index of the first character of the current line.
public int GetFirstCharIndexOfCurrentLine()
The zero-based character index in the current line.
Retrieves the location within the control at the specified character index.
Replaces the current selection in the text box with the contents of the Clipboard.
public void Paste()
Sets the selected text to the specified text without clearing the undo buffer.
Scrolls the contents of the control to the current caret position.
public void ScrollToCaret()
Activates the hosted text box control.
public void Select()
Selects all text in the text box.
public void SelectAll()
Events
Occurs when the element receives focus.
[Browsable(false)]
public event EventHandler GotFocus
Occurs when the CommandBarTextBox has focus and the user presses a key down
public event KeyEventHandler KeyDown
Occurs when the CommandBarTextBox has focus and the user presses a key
public event KeyPressEventHandler KeyPress
Occurs when the CommandBarTextBox has focus and the user releases the pressed key up
public event KeyEventHandler KeyUp
Occurs when the element loses focus.
[Browsable(false)]
public event EventHandler LostFocus
Occurs when the Text property value changes.
public event EventHandler TextChanged
Occurs when the Text property value is about to be changed.
public event TextChangingEventHandler TextChanging