Table of Contents

Class Button

Namespace
BSGameLib.UI.Builder.Models
Assembly
BSGameLib.UI.dll

The Button element of a view file.

public class Button : Control
Inheritance
Button
Inherited Members

Properties

ClickedState

The look while the button is pressed with the mouse. Falls back to NormalState.

public ControlState ClickedState { get; set; }

Property Value

ControlState

Command

The name of the view model's ICommand property that runs when the button is pressed.

public string Command { get; set; }

Property Value

string

FocusedState

The look while the button has keyboard focus. Falls back to NormalState.

public ControlState FocusedState { get; set; }

Property Value

ControlState

Font

The font for the button's text: a BMFont (.fnt) or TrueType (.ttf/.otf) file.

public string Font { get; set; }

Property Value

string

FontSize

The point size of the text. Zero keeps the font's own size.

[Range(0, 3.4028234663852886E+38)]
public float FontSize { get; set; }

Property Value

float

HoverState

The look while the pointer is over the button. Falls back to NormalState.

public ControlState HoverState { get; set; }

Property Value

ControlState

IsDefault

Whether Enter activates this button from anywhere on the view, unless the focused control needs Enter itself.

public bool IsDefault { get; set; }

Property Value

bool

LetterSpacing

Extra space between glyphs, in pixels. Zero adds none.

public float LetterSpacing { get; set; }

Property Value

float

NormalState

The look of the button in its normal state.

public ControlState NormalState { get; set; }

Property Value

ControlState

Size

The button's size in pixels. The XML Size attribute is SizeValue.

[Required]
public Size Size { get; set; }

Property Value

Size

SizeValue

The Size attribute's text, as XML reads and writes it. Use Size in code.

public string SizeValue { get; set; }

Property Value

string

Text

The text shown on the button. A "{Localize key}" shows that key's text in the current language.

public string Text { get; set; }

Property Value

string