Class TextBox
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
Focusable
Gets whether this view can receive keyboard focus. Always true for TextBox.
public override bool Focusable { get; }
Property Value
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
FontStretch
Gets or sets the font stretch.
public FontStretch FontStretch { get; set; }
Property Value
FontStyle
Gets or sets the font style.
public FontStyle FontStyle { get; set; }
Property Value
FontWeight
Gets or sets the font weight.
public FontWeight FontWeight { get; set; }
Property Value
InputFilter
Gets or sets the character filter predicate for input validation.
public Func<char, bool>? InputFilter { get; set; }
Property Value
IsPassword
Gets or sets whether input is masked as a password.
public bool IsPassword { get; set; }
Property Value
SelectAllOnFocus
Gets or sets whether all text is selected when the view receives focus.
public bool SelectAllOnFocus { get; set; }
Property Value
SelectedColor
Gets or sets the color of selected text.
public Color SelectedColor { get; set; }
Property Value
Selection
Gets or sets the current text selection range.
public Interval<uint>.ClosedOpen Selection { get; set; }
Property Value
SelectionBackgroundColor
Gets or sets the background color of the selection.
public Color SelectionBackgroundColor { get; set; }
Property Value
Text
Gets or sets the text content of this input.
public string Text { get; set; }