EmbeddedTextBox Class
Represents a TextBox that can be embedded into other controls.
public class EmbeddedTextBox : TextBox
- Inheritance:
- object Visual UIElement FrameworkElement Control TextBoxBase TextBox object
- Derived:
- BarComboBoxEmbeddedTextBox
Constructors
EmbeddedTextBox()
Initializes an instance of the class.
public EmbeddedTextBox()
Properties
CanSelectAllOnFocus
Indicates whether the textbox can select all text on focus.
public bool CanSelectAllOnFocus { get; set; }
Property Value
- bool:
trueif the textbox can select all text on focus; otherwise,false. The default value isfalse.
Methods
OnApplyTemplate()
Is called when a control template is applied.
public override void OnApplyTemplate()
OnContextMenuOpening(ContextMenuEventArgs)
Called whenever an unhandled ContextMenuOpening routed event reaches this class in its route. Implement this method to add class handling for this event.
protected override void OnContextMenuOpening(ContextMenuEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | ContextMenuEventArgs | Arguments of the event. |
OnGotKeyboardFocus(KeyboardFocusChangedEventArgs)
Invoked whenever an unhandled System.Windows.Input.Keyboard.GotKeyboardFocus attached routed event reaches an element derived from this class in its route. Implement this method to add class handling for this event.
protected override void OnGotKeyboardFocus(KeyboardFocusChangedEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | KeyboardFocusChangedEventArgs | Provides data about the event. |
OnPreviewMouseDown(MouseButtonEventArgs)
Invoked when an unhandled System.Windows.Input.Mouse.PreviewMouseDown attached routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected override void OnPreviewMouseDown(MouseButtonEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | MouseButtonEventArgs | The MouseButtonEventArgs that contains the event data. The event data reports that one or more mouse buttons were pressed. |
Fields
CanSelectAllOnFocusProperty
Defines the CanSelectAllOnFocus property.
public static readonly DependencyProperty CanSelectAllOnFocusProperty