Interface ITextInputBuilder<TBuilder>
What a text box and a password box share: the same attributes, and the same states.
public interface ITextInputBuilder<out TBuilder> : IControlBuilder<TBuilder>
Type Parameters
TBuilder
- Inherited Members
Methods
AllowOnlyNumbers(bool)
Sets whether only numeric characters can be typed, as the RestrictToNumbers attribute
does.
TBuilder AllowOnlyNumbers(bool restrictToNumbers = true)
Parameters
restrictToNumbersbool
Returns
- TBuilder
BindText(Action<IControlTextBindingBuilder<TBuilder>>)
Binds the text, with the binding set up by configure. Same result as BindText(string).
TBuilder BindText(Action<IControlTextBindingBuilder<out TBuilder>> configure)
Parameters
configureAction<IControlTextBindingBuilder<TBuilder>>
Returns
- TBuilder
BindText(string)
Binds the text to the view model property propertyName.
TBuilder BindText(string propertyName)
Parameters
propertyNamestring
Returns
- TBuilder
WithClickedState(Action<IControlStateBuilder<TBuilder>>)
Configures the look while the control is pressed with the mouse.
TBuilder WithClickedState(Action<IControlStateBuilder<out TBuilder>> configure)
Parameters
configureAction<IControlStateBuilder<TBuilder>>
Returns
- TBuilder
WithFocusedState(Action<IControlStateBuilder<TBuilder>>)
Configures the look while the control has keyboard focus.
TBuilder WithFocusedState(Action<IControlStateBuilder<out TBuilder>> configure)
Parameters
configureAction<IControlStateBuilder<TBuilder>>
Returns
- TBuilder
WithFont(string)
Sets the font for the text: a BMFont (.fnt) or TrueType (.ttf/.otf) file.
TBuilder WithFont(string fontName)
Parameters
fontNamestring
Returns
- TBuilder
WithFontSize(float)
Sets the point size of the text. Zero keeps the font's own size.
TBuilder WithFontSize(float size)
Parameters
sizefloat
Returns
- TBuilder
WithHoverState(Action<IControlStateBuilder<TBuilder>>)
Configures the look while the pointer is over the control.
TBuilder WithHoverState(Action<IControlStateBuilder<out TBuilder>> configure)
Parameters
configureAction<IControlStateBuilder<TBuilder>>
Returns
- TBuilder
WithLabel(string)
Sets a label shown with the control. A "{Localize key}" shows that key's text in the current language.
TBuilder WithLabel(string label)
Parameters
labelstring
Returns
- TBuilder
WithNormalState(Action<IControlStateBuilder<TBuilder>>)
Configures the look in the normal state.
TBuilder WithNormalState(Action<IControlStateBuilder<out TBuilder>> configure)
Parameters
configureAction<IControlStateBuilder<TBuilder>>
Returns
- TBuilder
WithSize(int, int)
Sets the control's size in pixels.
TBuilder WithSize(int width, int height)
Parameters
Returns
- TBuilder
WithText(string)
Sets the initial text. A "{Localize key}" shows that key's text in the current language.
TBuilder WithText(string text)
Parameters
textstring
Returns
- TBuilder