Interface IDecorationBuilder
A purely visual mark pinned to a corner or edge of the view, the same as a
Decoration in view.xsd. It sits outside the layout and takes no space in it.
public interface IDecorationBuilder
Methods
WithAnchor(DecorationAnchor)
Sets the corner or edge of the view the decoration is pinned to.
IDecorationBuilder WithAnchor(DecorationAnchor anchor)
Parameters
anchorDecorationAnchor
Returns
WithBorderColor(string)
Sets the color of a border drawn inside the border thickness.
IDecorationBuilder WithBorderColor(string colorHex)
Parameters
colorHexstring
Returns
WithBorderThickness(int)
Sets the border's width in pixels. Has no effect without a border color.
IDecorationBuilder WithBorderThickness(int thickness)
Parameters
thicknessint
Returns
WithFillColor(string)
Sets a flat fill color.
IDecorationBuilder WithFillColor(string colorHex)
Parameters
colorHexstring
Returns
WithFillGradient(string)
Sets a gradient fill, naming a Gradient resource. Drawn in place of the fill color when
both are set.
IDecorationBuilder WithFillGradient(string gradientId)
Parameters
gradientIdstring
Returns
WithHorizontalThreePatchTextureReference(string)
Uses a horizontal three-patch texture declared in the view's resources.
IDecorationBuilder WithHorizontalThreePatchTextureReference(string id)
Parameters
idstring
Returns
WithLayer(DecorationLayer)
Sets whether the decoration is painted behind the controls or over them.
IDecorationBuilder WithLayer(DecorationLayer layer)
Parameters
layerDecorationLayer
Returns
WithNinePatchTextureReference(string)
Uses a nine-patch texture declared in the view's resources.
IDecorationBuilder WithNinePatchTextureReference(string id)
Parameters
idstring
Returns
WithOffset(int, int)
Sets the distance in pixels inward from the anchor.
IDecorationBuilder WithOffset(int x, int y)
Parameters
Returns
WithSize(int, int)
Sets the decoration's size in pixels. Needed unless the decoration stretches to cover the view.
IDecorationBuilder WithSize(int width, int height)
Parameters
Returns
WithStretch(bool)
Sets whether the decoration covers the whole view, ignoring the anchor, offset and size.
IDecorationBuilder WithStretch(bool stretch)
Parameters
stretchbool
Returns
WithTexture(string, string)
Sets a texture drawn over the decoration, from a file under the id id.
IDecorationBuilder WithTexture(string id, string sourceFile)
Parameters
Returns
WithTextureColor(string)
Sets the tint applied to the texture, if one is set.
IDecorationBuilder WithTextureColor(string colorHex)
Parameters
colorHexstring
Returns
WithTextureIndexAtlas(string, int, string, int, int)
Sets the texture to one indexed texture of an atlas file.
IDecorationBuilder WithTextureIndexAtlas(string id, int index, string sourceFile, int eachTextureWidth, int eachTextureHeight)
Parameters
Returns
WithTextureIndexReference(string, int)
Uses one indexed texture of an atlas declared in the view's resources.
IDecorationBuilder WithTextureIndexReference(string id, int index)
Parameters
Returns
WithTextureReference(string)
Uses a texture declared in the view's resources.
IDecorationBuilder WithTextureReference(string id)
Parameters
idstring
Returns
WithTextureRegionAtlas(string, string, string, int, int, int, int)
Sets the texture to one named region of a texture atlas file.
IDecorationBuilder WithTextureRegionAtlas(string id, string sourceFile, string regionId, int x, int y, int width, int height)
Parameters
Returns
WithTextureRegionReference(string, string)
Uses one named region of a texture atlas declared in the view's resources.
IDecorationBuilder WithTextureRegionReference(string id, string regionName)