Skip to content

TextBox class

Defined in

Namespace: CrissCross.WPF.UI.Controls Assembly: CrissCross.WPF.UI.dll Full name: CrissCross.WPF.UI.Controls.TextBox Modifiers: public

Summary

Extended TextBox with additional parameters like PlaceholderText.

Applies to

net10.0-windows10.0.19041, net9.0-windows10.0.19041, net8.0-windows10.0.19041, net481

Class hierarchy
classDiagram
class TextBox
class TextBox
TextBox <|-- TextBox

Inherits from: TextBox

Constructors

NameSummary
.ctorInitializes a new instance of the [TextBox](# class.

Properties

NameSummary
IconGets or sets displayed [IconElement](#
IconPlacementGets or sets which side the icon should be placed on.
PlaceholderTextGets or sets placeholder text.
PlaceholderEnabledGets or sets a value indicating whether to enable the placeholder text.
CurrentPlaceholderEnabledGets or sets a value indicating whether to display the placeholder text.
ClearButtonEnabledGets or sets a value indicating whether to enable the clear button.
ShowClearButtonGets or sets a value indicating whether to show the clear button when [TextBox](# is focused.
IsTextSelectionEnabledGets or sets a value indicating whether text selection is enabled.
TemplateButtonCommandGets the command triggered when clicking the button.
OnTemplateButtonClickCommandTriggered by clicking a button in the control template.

Fields

NameSummary
static IconPropertyIdentifies the [Icon](# dependency property.
static IconPlacementPropertyIdentifies the [IconPlacement](# dependency property.
static PlaceholderTextPropertyIdentifies the [PlaceholderText](# dependency property.
static PlaceholderEnabledPropertyIdentifies the [PlaceholderEnabled](# dependency property.
static CurrentPlaceholderEnabledPropertyIdentifies the [CurrentPlaceholderEnabled](# dependency property.
static ClearButtonEnabledPropertyIdentifies the [ClearButtonEnabled](# dependency property.
static ShowClearButtonPropertyIdentifies the [ShowClearButton](# dependency property.
static IsTextSelectionEnabledPropertyIdentifies the [IsTextSelectionEnabled](# dependency property.
static TemplateButtonCommandPropertyIdentifies the [TemplateButtonCommand](# dependency property.

Methods

NameSummary
OnTextChanged
SetPlaceholderTextVisibilitySets the placeholder text visibility.
OnGotFocus
OnLostFocus
RevealClearButtonReveals the clear button by [ShowClearButton](# property.
HideClearButtonHides the clear button by [ShowClearButton](# property.
OnClearButtonClickTriggered when the user clicks the clear text button.
OnTemplateButtonClickTriggered by clicking a button in the control template.
OnPlaceholderEnabledChangedCalled when [placeholder enabled changed].

Derived types

Inherited members