Interface IControlStateBuilder<TControlBuilder>
Configures the look of a control in one state: its colors, textures, border and shadow.
public interface IControlStateBuilder<out TControlBuilder>
Type Parameters
TControlBuilder
Methods
WithBorderColor(string)
Sets the color of a border drawn inside the border thickness in this state.
IControlStateBuilder<out TControlBuilder> WithBorderColor(string colorHex)
Parameters
colorHexstring
Returns
- IControlStateBuilder<TControlBuilder>
WithBorderThickness(int)
Sets the border's width in pixels. Has no effect without a border color.
IControlStateBuilder<out TControlBuilder> WithBorderThickness(int thickness)
Parameters
thicknessint
Returns
- IControlStateBuilder<TControlBuilder>
WithColor(string)
Sets the color of the texture in this state.
IControlStateBuilder<out TControlBuilder> WithColor(string colorHex)
Parameters
colorHexstring
Returns
- IControlStateBuilder<TControlBuilder>
WithFillColor(string)
Sets a flat fill color in this state.
IControlStateBuilder<out TControlBuilder> WithFillColor(string colorHex)
Parameters
colorHexstring
Returns
- IControlStateBuilder<TControlBuilder>
WithFillGradient(string)
Sets a gradient fill in this state, naming a Gradient resource. Drawn in place of the
fill color when both are set.
IControlStateBuilder<out TControlBuilder> WithFillGradient(string gradientId)
Parameters
gradientIdstring
Returns
- IControlStateBuilder<TControlBuilder>
WithFontColor(string)
Sets the color of the text in this state.
IControlStateBuilder<out TControlBuilder> WithFontColor(string colorHex)
Parameters
colorHexstring
Returns
- IControlStateBuilder<TControlBuilder>
WithHorizontalThreePatchTextureReference(string)
Uses a horizontal three-patch texture declared in the view's resources in this state.
IControlStateBuilder<out TControlBuilder> WithHorizontalThreePatchTextureReference(string id)
Parameters
idstring
Returns
- IControlStateBuilder<TControlBuilder>
WithNinePatchTextureReference(string)
Uses a nine-patch texture declared in the view's resources in this state.
IControlStateBuilder<out TControlBuilder> WithNinePatchTextureReference(string id)
Parameters
idstring
Returns
- IControlStateBuilder<TControlBuilder>
WithShadowBlur(int)
Sets the shadow's blur in pixels.
IControlStateBuilder<out TControlBuilder> WithShadowBlur(int blur)
Parameters
blurint
Returns
- IControlStateBuilder<TControlBuilder>
WithShadowColor(string)
Sets the color of a soft drop shadow in this state. Nothing is drawn without it.
IControlStateBuilder<out TControlBuilder> WithShadowColor(string colorHex)
Parameters
colorHexstring
Returns
- IControlStateBuilder<TControlBuilder>
WithShadowOffset(int, int)
Sets how far the shadow is moved from the control, in pixels.
IControlStateBuilder<out TControlBuilder> WithShadowOffset(int x, int y)
Parameters
Returns
- IControlStateBuilder<TControlBuilder>
WithShadowSpread(int)
Sets how much larger than the control the shadow is, in pixels. Negative values pull it in.
IControlStateBuilder<out TControlBuilder> WithShadowSpread(int spread)
Parameters
spreadint
Returns
- IControlStateBuilder<TControlBuilder>
WithTexture(string, string)
Sets the texture in this state from a file, under the id id.
IControlStateBuilder<out TControlBuilder> WithTexture(string id, string sourceFile)
Parameters
Returns
- IControlStateBuilder<TControlBuilder>
WithTextureIndexAtlas(string, int, string, int, int)
Sets the texture in this state to one indexed texture of an atlas file.
IControlStateBuilder<out TControlBuilder> WithTextureIndexAtlas(string id, int index, string sourceFile, int eachTextureWidth, int eachTextureHeight)
Parameters
Returns
- IControlStateBuilder<TControlBuilder>
WithTextureIndexReference(string, int)
Uses one indexed texture of an atlas declared in the view's resources in this state.
IControlStateBuilder<out TControlBuilder> WithTextureIndexReference(string id, int index)
Parameters
Returns
- IControlStateBuilder<TControlBuilder>
WithTextureReference(string)
Uses a texture declared in the view's resources in this state.
IControlStateBuilder<out TControlBuilder> WithTextureReference(string id)
Parameters
idstring
Returns
- IControlStateBuilder<TControlBuilder>
WithTextureRegionAtlas(string, string, string, int, int, int, int)
Sets the texture in this state to one named region of an atlas file.
IControlStateBuilder<out TControlBuilder> WithTextureRegionAtlas(string id, string sourceFile, string regionId, int x, int y, int width, int height)
Parameters
Returns
- IControlStateBuilder<TControlBuilder>
WithTextureRegionReference(string, string)
Uses one named region of an atlas declared in the view's resources in this state.
IControlStateBuilder<out TControlBuilder> WithTextureRegionReference(string id, string regionName)
Parameters
Returns
- IControlStateBuilder<TControlBuilder>