Table of Contents

Class TextBox

Namespace
Xui.Core.UI
Assembly
Xui.Core.dll

A single-line text input view implemented as LayerView<View, FocusBorderLayer<View, TextInputLayer>>. All text editing state, selection, caret blinking, and hit-testing live in TextInputLayer; focus-aware border drawing lives in FocusBorderLayer<TView, TChild>.

public class TextBox : LayerView<View, FocusBorderLayer<View, TextInputLayer>>, ILayerHost, IServiceProvider
Inheritance
TextBox
Implements
Inherited Members
Extension Methods

Constructors

TextBox()

Initializes a new TextBox with default styling.

public TextBox()

Properties

Color

Gets or sets the text color.

public Color Color { get; set; }

Property Value

Color

Focusable

Gets whether this view can receive keyboard focus. Always true for TextBox.

public override bool Focusable { get; }

Property Value

bool

FontFamily

Gets or sets the font family name.

public string[] FontFamily { get; set; }

Property Value

string[]

FontSize

Gets or sets the font size.

public NFloat FontSize { get; set; }

Property Value

NFloat

FontStretch

Gets or sets the font stretch.

public FontStretch FontStretch { get; set; }

Property Value

FontStretch

FontStyle

Gets or sets the font style.

public FontStyle FontStyle { get; set; }

Property Value

FontStyle

FontWeight

Gets or sets the font weight.

public FontWeight FontWeight { get; set; }

Property Value

FontWeight

InputFilter

Gets or sets the character filter predicate for input validation.

public Func<char, bool>? InputFilter { get; set; }

Property Value

Func<char, bool>

IsPassword

Gets or sets whether input is masked as a password.

public bool IsPassword { get; set; }

Property Value

bool

SelectAllOnFocus

Gets or sets whether all text is selected when the view receives focus.

public bool SelectAllOnFocus { get; set; }

Property Value

bool

SelectedColor

Gets or sets the color of selected text.

public Color SelectedColor { get; set; }

Property Value

Color

Selection

Gets or sets the current text selection range.

public Interval<uint>.ClosedOpen Selection { get; set; }

Property Value

Interval<uint>.ClosedOpen

SelectionBackgroundColor

Gets or sets the background color of the selection.

public Color SelectionBackgroundColor { get; set; }

Property Value

Color

Text

Gets or sets the text content of this input.

public string Text { get; set; }

Property Value

string