Table of Contents

Class TextBoxStyle

Namespace
Myra.Graphics2D.UI.Styles
Assembly
Myra.dll

Style class that defines the visual appearance of text box widgets.

public class TextBoxStyle : WidgetStyle
Inheritance
TextBoxStyle
Inherited Members

Constructors

TextBoxStyle()

Initializes a new instance of the TextBoxStyle class.

public TextBoxStyle()

TextBoxStyle(TextBoxStyle)

Initializes a new instance of the TextBoxStyle class by copying properties from another style.

public TextBoxStyle(TextBoxStyle style)

Parameters

style TextBoxStyle

The source text box style to copy from.

Properties

Cursor

Gets or sets the image used to draw the text cursor.

public IImage Cursor { get; set; }

Property Value

IImage

DisabledTextColor

Gets or sets the color of the text box's text when disabled, or null to use the default.

public Color? DisabledTextColor { get; set; }

Property Value

Color?

FocusedTextColor

Gets or sets the color of the text box's text when the widget has focus, or null to use the default.

public Color? FocusedTextColor { get; set; }

Property Value

Color?

Font

Gets or sets the font used to render the text box's text.

public SpriteFontBase Font { get; set; }

Property Value

SpriteFontBase

MessageFont

Gets or sets the font used to render the hint/placeholder text.

public SpriteFontBase MessageFont { get; set; }

Property Value

SpriteFontBase

OverTextColor

Gets or sets the color of the text box's text when the mouse is over the widget, or null to use the default.

public Color? OverTextColor { get; set; }

Property Value

Color?

PressedTextColor

Gets or sets the color of the text box's text when the widget is pressed, or null to use the default.

public Color? PressedTextColor { get; set; }

Property Value

Color?

Selection

Gets or sets the brush used to highlight selected text.

public IBrush Selection { get; set; }

Property Value

IBrush

TextColor

Gets or sets the color of the text box's text.

public Color TextColor { get; set; }

Property Value

Color

Methods

Clone()

Creates a deep copy of this text box style.

public override WidgetStyle Clone()

Returns

WidgetStyle

A new TextBoxStyle instance with the same properties.