Skip to main content

RectangleElement

Namespace: Busy.Bar

A rectangle, optionally filled and/or bordered, to display.

public sealed record class RectangleElement : DisplayElement, System.IEquatable`1[[Busy.Bar.DisplayElement, BusyBar, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], System.IEquatable`1[[Busy.Bar.RectangleElement, BusyBar, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]

Inheritance ObjectDisplayElement → RectangleElement
Implements IEquatable<DisplayElement>, IEquatable<RectangleElement>
Attributes NullableContextAttribute, NullableAttribute, RequiredMemberAttribute

Properties

Width

Width of the rectangle, in pixels.

public required int Width { get; init; }

Property Value

Int32

Height

Height of the rectangle, in pixels.

public required int Height { get; init; }

Property Value

Int32

Radius

Corner radius of the rectangle, in pixels (0 for sharp corners).

public int Radius { get; init; }

Property Value

Int32

Fill

Fill style of the rectangle.

public RectangleFill Fill { get; init; }

Property Value

RectangleFill

FillColors

Colors used to fill the rectangle. Provide one color for RectangleFill.Solid, or two for a gradient fill.

public IReadOnlyList<string> FillColors { get; init; }

Property Value

IReadOnlyList<String>

BorderWidth

Width of the rectangle's border, in pixels (0 for no border).

public int BorderWidth { get; init; }

Property Value

Int32

BorderColor

Border color, in #RRGGBBAA format.

public string BorderColor { get; init; }

Property Value

String

Id

Unique identifier for the element, used to update or remove it later.

public required string Id { get; init; }

Property Value

String

Timeout

Time in seconds the element should remain displayed (0 for no timeout). Mutually exclusive with DisplayElement.DisplayUntil.

public int? Timeout { get; init; }

Property Value

Int32?

DisplayUntil

Unix timestamp, in seconds, at which the element is hidden. Mutually exclusive with DisplayElement.Timeout.

public string? DisplayUntil { get; init; }

Property Value

String

X

X coordinate of the element's anchor point, relative to the top-left of the display.

public int X { get; init; }

Property Value

Int32

Y

Y coordinate of the element's anchor point, relative to the top-left of the display.

public int Y { get; init; }

Property Value

Int32

Display

Which display to draw the element on.

public DisplayTarget Display { get; init; }

Property Value

DisplayTarget

Align

Anchor point of the element, used together with DisplayElement.X/DisplayElement.Y to position it.

public ElementAlign? Align { get; init; }

Property Value

ElementAlign?

Constructors

RectangleElement()

Caution

Constructors of types with required members are not supported in this version of your compiler.


public RectangleElement()