Table of Contents

Interface ICheckableControlBuilder<TBuilder>

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

What a check box and a radio button share: the same attributes, and the same states.

public interface ICheckableControlBuilder<out TBuilder> : IControlBuilder<TBuilder>

Type Parameters

TBuilder
Inherited Members

Methods

BindChecked(string)

Binds the checked state to the view model property propertyName.

TBuilder BindChecked(string propertyName)

Parameters

propertyName string

Returns

TBuilder

BindText(Action<IControlTextBindingBuilder<TBuilder>>)

Binds the label text, with the binding set up by configure.

TBuilder BindText(Action<IControlTextBindingBuilder<out TBuilder>> configure)

Parameters

configure Action<IControlTextBindingBuilder<TBuilder>>

Returns

TBuilder

BindText(string)

Binds the label text to the view model property propertyName.

TBuilder BindText(string propertyName)

Parameters

propertyName string

Returns

TBuilder

WithBoxSize(float)

Sets the side length of the box in pixels, as the BoxSize attribute does.

TBuilder WithBoxSize(float size)

Parameters

size float

Returns

TBuilder

WithCheckMarkColor(string)

Sets the color of the check mark. Used only by a flat-themed check box, not one drawn from textures.

TBuilder WithCheckMarkColor(string colorHex)

Parameters

colorHex string

Returns

TBuilder

WithChecked(bool)

Sets whether the control starts checked.

TBuilder WithChecked(bool isChecked)

Parameters

isChecked bool

Returns

TBuilder

WithCheckedState(Action<IControlStateBuilder<TBuilder>>)

Configures the look of the control while it is checked.

TBuilder WithCheckedState(Action<IControlStateBuilder<out TBuilder>> configure)

Parameters

configure Action<IControlStateBuilder<TBuilder>>

Returns

TBuilder

WithFont(string)

Sets the font for the label text: a BMFont (.fnt) or TrueType (.ttf/.otf) file.

TBuilder WithFont(string fontName)

Parameters

fontName string

Returns

TBuilder

WithFontSize(float)

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

TBuilder WithFontSize(float size)

Parameters

size float

Returns

TBuilder

WithSize(int, int)

Sets the control's size in pixels, as the Size attribute does.

TBuilder WithSize(int width, int height)

Parameters

width int
height int

Returns

TBuilder

WithText(string)

Sets the label text. A "{Localize key}" shows that key's text in the current language.

TBuilder WithText(string text)

Parameters

text string

Returns

TBuilder

WithUncheckedState(Action<IControlStateBuilder<TBuilder>>)

Configures the look of the control while it is unchecked.

TBuilder WithUncheckedState(Action<IControlStateBuilder<out TBuilder>> configure)

Parameters

configure Action<IControlStateBuilder<TBuilder>>

Returns

TBuilder