Table of Contents

Class Control

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

The attributes every control in a view file shares. Each control type derives from it.

[KnownType(typeof(Button))]
[KnownType(typeof(CheckBox))]
[KnownType(typeof(ComboBox))]
[KnownType(typeof(StackLayout))]
[KnownType(typeof(DockLayout))]
[KnownType(typeof(Image))]
[KnownType(typeof(Label))]
[KnownType(typeof(GridLayout))]
[KnownType(typeof(RadioButton))]
[KnownType(typeof(TextBox))]
[KnownType(typeof(PasswordBox))]
[KnownType(typeof(ProgressBar))]
[KnownType(typeof(Slider))]
[KnownType(typeof(Repeater))]
public abstract class Control
Inheritance
Control
Derived
Inherited Members

Properties

Disabled

Whether the control is disabled and takes no input. Written through DisabledValue.

public bool Disabled { get; set; }

Property Value

bool

DisabledBinding

The binding the Disabled attribute was given, when it was one; otherwise null.

public string DisabledBinding { get; set; }

Property Value

string

DisabledValue

The Disabled attribute's text: a literal, or a binding. Use Disabled in code.

public string DisabledValue { get; set; }

Property Value

string

Dock

The edge the control docks to in a dock layout. None when it is not docked.

[EnumDataType(typeof(DockPosition))]
public DockPosition Dock { get; set; }

Property Value

DockPosition

HoverKey

The text shown when the pointer rests on the control, which the game asks the view for. A binding to a property also works.

public string HoverKey { get; set; }

Property Value

string

Id

The name the game's code uses to find the control.

public string Id { get; set; }

Property Value

string

IsInitialFocus

Whether focus lands on this control when the view opens. The first such control that is visible and enabled wins.

public bool IsInitialFocus { get; set; }

Property Value

bool

Margin

The space reserved around the control by its parent layout. The XML Margin attribute is MarginValue.

public Spacing Margin { get; set; }

Property Value

Spacing

MarginValue

The Margin attribute's text form. Use Margin in code.

public string MarginValue { get; set; }

Property Value

string

PanelTitle

Whether this control is the title a panel is dragged by. Ignored outside a panel.

public bool PanelTitle { get; set; }

Property Value

bool

Position

The control's position in pixels. The XML Position attribute is PositionValue.

public Point Position { get; set; }

Property Value

Point

PositionValue

The Position attribute's text form. Use Position in code.

public string PositionValue { get; set; }

Property Value

string

Style

The name of a style in the view's resources to take states and text settings from. The control's own settings win over it.

public string Style { get; set; }

Property Value

string

Visible

Whether the control is shown. Written through VisibleValue.

public bool Visible { get; set; }

Property Value

bool

VisibleBinding

The binding the Visible attribute was given, when it was one; otherwise null.

public string VisibleBinding { get; set; }

Property Value

string

VisibleValue

The Visible attribute's text: a literal, or a binding. Use Visible in code.

public string VisibleValue { get; set; }

Property Value

string