TextBox Class
Represents a textbox ribbon control.
public class TextBox : TextBoxBase, IKeyTipTarget, IVariantControl
- Inheritance:
- object Visual UIElement FrameworkElement Control TextBoxBase TextBox TextBoxBase object
- Implements:
- IKeyTipTarget IVariantControl
Constructors
TextBox()
Initializes an instance of the TextBox class.
public TextBox()
TextBox(ICommand)
Initializes an instance of the TextBox class.
public TextBox(ICommand command)
| Parameter | Type | Description |
|---|---|---|
| command | ICommand | The ICommand to assign to the button. |
Methods
CoerceCommandParameter(DependencyObject, object)
Coerces a new CommandParameterProperty value.
protected override object CoerceCommandParameter(DependencyObject obj, object value)
| Parameter | Type | Description |
|---|---|---|
| obj | DependencyObject | The System.Windows.DependencyObject whose property is changed. |
| value | object | The new value being set. |
Returns
- object:
The coerced value to set.
OnClick(ExecuteRoutedEventArgs)
Called when the control is clicked and a Click event is raised
protected override void OnClick(ExecuteRoutedEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | ExecuteRoutedEventArgs | An |
OnGotKeyboardFocus(KeyboardFocusChangedEventArgs)
Occurs after the control gains keyboard focus.
protected override void OnGotKeyboardFocus(KeyboardFocusChangedEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | KeyboardFocusChangedEventArgs | A KeyboardFocusChangedEventArgs that contains the event data. |
OnKeyDown(KeyEventArgs)
Occurs when a key is pressed while the control has focus.
protected override void OnKeyDown(KeyEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | KeyEventArgs | A KeyEventArgs that contains the event data. |
OnLostKeyboardFocus(KeyboardFocusChangedEventArgs)
Occurs after the control loses keyboard focus.
protected override void OnLostKeyboardFocus(KeyboardFocusChangedEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | KeyboardFocusChangedEventArgs | A KeyboardFocusChangedEventArgs that contains the event data. |
SetText(string)
Sets the Text property and can optionally perform other operations.
protected override void SetText(string text)
| Parameter | Type | Description |
|---|---|---|
| text | string | The text. |
UpdateCanExecute()
Updates whether the command can execute.
protected override void UpdateCanExecute()
Inherited Members
- TextBoxBase.ClickEvent
- TextBoxBase.PreviewClickEvent
- TextBoxBase.ScreenTipClosingEvent
- TextBoxBase.ScreenTipOpeningEvent
- TextBoxBase.CommandProperty
- TextBoxBase.CommandParameterProperty
- TextBoxBase.CommandTargetProperty
- TextBoxBase.ContextProperty
- TextBoxBase.HasImageProperty
- TextBoxBase.HasLabelProperty
- TextBoxBase.HintProperty
- TextBoxBase.HintTemplateProperty
- TextBoxBase.HintTemplateSelectorProperty
- TextBoxBase.IdProperty
- TextBoxBase.ImageSourceLargeProperty
- TextBoxBase.ImageSourceSmallProperty
- TextBoxBase.IsHighlightedProperty
- TextBoxBase.KeyTipAccessTextProperty
- TextBoxBase.LabelProperty
- TextBoxBase.ScreenTipDescriptionProperty
- TextBoxBase.ScreenTipFooterProperty
- TextBoxBase.ScreenTipHeaderProperty
- TextBoxBase.ScreenTipHelpUriProperty
- TextBoxBase.ScreenTipImageSourceProperty
- TextBoxBase.VariantSizeProperty
- TextBoxBase.OnCommandChanged(ICommand, ICommand)
- TextBoxBase.OnContextChanged(ControlContext, ControlContext)
- TextBoxBase.OnCreateAutomationPeer()
- TextBoxBase.OnKeyTipAccessed(string)
- TextBoxBase.OnPreviewClick(ExecuteRoutedEventArgs)
- TextBoxBase.OnPropertyChanged(DependencyPropertyChangedEventArgs)
- TextBoxBase.OnScreenTipClosing(RoutedEventArgs)
- TextBoxBase.OnScreenTipOpening(RoutedEventArgs)
- TextBoxBase.OnVariantSizeChanged(VariantSize, VariantSize)
- TextBoxBase.RaiseClickEvent(ExecuteRoutedEventArgs)
- TextBoxBase.CanUpdateCanExecuteWhenHidden
- TextBoxBase.Command
- TextBoxBase.CommandParameter
- TextBoxBase.CommandTarget
- TextBoxBase.Context
- TextBoxBase.HasImage
- TextBoxBase.Hint
- TextBoxBase.HintTemplate
- TextBoxBase.HintTemplateSelector
- TextBoxBase.HasLabel
- TextBoxBase.Id
- TextBoxBase.ImageSourceLarge
- TextBoxBase.ImageSourceSmall
- TextBoxBase.IsHighlighted
- TextBoxBase.KeyTipAccessText
- TextBoxBase.Label
- TextBoxBase.ScreenTipDescription
- TextBoxBase.ScreenTipFooter
- TextBoxBase.ScreenTipHeader
- TextBoxBase.ScreenTipHelpUri
- TextBoxBase.ScreenTipImageSource
- TextBoxBase.VariantSize
- TextBoxBase.Click
- TextBoxBase.PreviewClick
- TextBoxBase.ScreenTipClosing
- TextBoxBase.ScreenTipOpening