StyleBoxLine
Straight-line style with thickness and independent length growth.
Defaults to a horizontal black line with Thickness = 1 and GrowBegin/GrowEnd = 1. Vertical changes the axis. Thickness supplies half-padding on each perpendicular side: horizontal thickness 5 gives minimum (0, 5), vertical gives (5, 0).
Explicit ContentMargin overrides these margins: zeroes can remove minimum size while retaining draw thickness. GrowBegin/End extend drawing along the axis without reserving layout length. Use nonnegative Thickness; setter does not constrain it. Grow values store floats, but drawing uses an integer rectangle. Even repeated identical colors/parameters emit Changed.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
StyleBoxLineConstructor
public StyleBoxLine();Creates a horizontal black line: Thickness = 1, GrowBegin = GrowEnd = 1, Vertical = false. Automatic margins yield minimum (0, 1).
Properties5
ColorProperty
public Color Color { get; set; }Line color/alpha, default opaque black. Setter emits Changed even for the same color.
GrowBeginProperty
public float GrowBegin { get; set; }Drawing extension from the starting edge along the line, default 1. Does not add length to minimum size; fractional values draw through an integer rect.
GrowEndProperty
public float GrowEnd { get; set; }Drawing extension beyond the ending edge, default 1. Does not change content padding or parent-allocated length.
ThicknessProperty
public int Thickness { get; set; }Line thickness in pixels, default 1. Supplies half-padding on perpendicular sides; ContentMargin can override it. Use a nonnegative number.
VerticalProperty
public bool Vertical { get; set; }true for vertical line axis, default false. Changes perpendicular automatic margins rather than parent-container orientation.
Methods10
GetColorColor
public Color GetColor();Line color/alpha, default opaque black. Setter emits Changed even for the same color.
ColorLine color.
GetGrowBeginfloat
public float GetGrowBegin();Drawing extension from the starting edge along the line, default 1. Does not add length to minimum size; fractional values draw through an integer rect.
floatStored starting-edge drawing extension.
GetGrowEndfloat
public float GetGrowEnd();Drawing extension beyond the ending edge, default 1. Does not change content padding or parent-allocated length.
floatStored ending-edge drawing extension.
GetThicknessint
public int GetThickness();Line thickness in pixels, default 1. Supplies half-padding on perpendicular sides; ContentMargin can override it. Use a nonnegative number.
intStored line thickness in pixels.
IsVerticalbool
public bool IsVertical();true for vertical line axis, default false. Changes perpendicular automatic margins rather than parent-container orientation.
booltrue for a vertical line.
SetColorvoid
public void SetColor(Color color);Line color/alpha, default opaque black. Setter emits Changed even for the same color.
| Name | Type | Default |
|---|---|---|
color | Color | — |
colorLine color/alpha, default opaque black. Setter emits Changed even for the same color.
SetGrowBeginvoid
public void SetGrowBegin(float offset);Drawing extension from the starting edge along the line, default 1. Does not add length to minimum size; fractional values draw through an integer rect.
| Name | Type | Default |
|---|---|---|
offset | float | — |
offsetDrawing extension from the starting edge along the line, default 1. Does not add length to minimum size; fractional values draw through an integer rect.
SetGrowEndvoid
public void SetGrowEnd(float offset);Drawing extension beyond the ending edge, default 1. Does not change content padding or parent-allocated length.
| Name | Type | Default |
|---|---|---|
offset | float | — |
offsetDrawing extension beyond the ending edge, default 1. Does not change content padding or parent-allocated length.
SetThicknessvoid
public void SetThickness(int thickness);Line thickness in pixels, default 1. Supplies half-padding on perpendicular sides; ContentMargin can override it. Use a nonnegative number.
| Name | Type | Default |
|---|---|---|
thickness | int | — |
thicknessLine thickness in pixels, default 1. Supplies half-padding on perpendicular sides; ContentMargin can override it. Use a nonnegative number.
SetVerticalvoid
public void SetVertical(bool vertical);true for vertical line axis, default false. Changes perpendicular automatic margins rather than parent-container orientation.
| Name | Type | Default |
|---|---|---|
vertical | bool | — |
verticaltrue for vertical line axis, default false. Changes perpendicular automatic margins rather than parent-container orientation.