Interface IStyleBuilder
A Style resource: text settings and per-state looks that controls name with Style="id".
public interface IStyleBuilder
Methods
WithBasedOn(string)
Names another style this one builds on. Whatever this style does not set is taken from it.
IStyleBuilder WithBasedOn(string styleId)
Parameters
styleIdstring
Returns
WithCheckedState(Action<IControlStateBuilder<IStyleBuilder>>)
Configures the look of a check box or radio button while checked.
IStyleBuilder WithCheckedState(Action<IControlStateBuilder<IStyleBuilder>> configure)
Parameters
configureAction<IControlStateBuilder<IStyleBuilder>>
Returns
WithClickedState(Action<IControlStateBuilder<IStyleBuilder>>)
Configures the look while a control is pressed with the mouse.
IStyleBuilder WithClickedState(Action<IControlStateBuilder<IStyleBuilder>> configure)
Parameters
configureAction<IControlStateBuilder<IStyleBuilder>>
Returns
WithFocusedState(Action<IControlStateBuilder<IStyleBuilder>>)
Configures the look while a control has keyboard focus.
IStyleBuilder WithFocusedState(Action<IControlStateBuilder<IStyleBuilder>> configure)
Parameters
configureAction<IControlStateBuilder<IStyleBuilder>>
Returns
WithFont(string)
Sets the font for the text: a BMFont (.fnt) or TrueType (.ttf/.otf) file.
IStyleBuilder WithFont(string fontName)
Parameters
fontNamestring
Returns
WithFontSize(float)
Sets the point size of the text. Zero keeps the control's own size.
IStyleBuilder WithFontSize(float size)
Parameters
sizefloat
Returns
WithHoverState(Action<IControlStateBuilder<IStyleBuilder>>)
Configures the look while the pointer is over a control.
IStyleBuilder WithHoverState(Action<IControlStateBuilder<IStyleBuilder>> configure)
Parameters
configureAction<IControlStateBuilder<IStyleBuilder>>
Returns
WithLetterSpacing(float)
Sets the extra space between glyphs, in pixels. Zero keeps the control's own spacing.
IStyleBuilder WithLetterSpacing(float spacing)
Parameters
spacingfloat
Returns
WithNormalState(Action<IControlStateBuilder<IStyleBuilder>>)
Configures the look of a control in its normal state.
IStyleBuilder WithNormalState(Action<IControlStateBuilder<IStyleBuilder>> configure)
Parameters
configureAction<IControlStateBuilder<IStyleBuilder>>
Returns
WithUncheckedState(Action<IControlStateBuilder<IStyleBuilder>>)
Configures the look of a check box or radio button while unchecked.
IStyleBuilder WithUncheckedState(Action<IControlStateBuilder<IStyleBuilder>> configure)
Parameters
configureAction<IControlStateBuilder<IStyleBuilder>>