Table of Contents

Class GroupBox

Namespace
PluginUI
Assembly
PluginUI.dll

Titled section: a rounded frame with a header strip holding the title, an optional collapse chevron and a single content element.

public class GroupBox : ContentPanel
Inheritance
GroupBox
Inherited Members

Remarks

Collapsing hides the content (its IsVisible is restored on expand).

Constructors

GroupBox()

Creates a group box.

public GroupBox()

GroupBox(string, UIElement?)

Creates a titled group box.

public GroupBox(string header, UIElement? content = null)

Parameters

header string
content UIElement

Properties

Header

Title.

public string? Header { get; set; }

Property Value

string

HeaderAccent

Accent bar color at the left of the title (transparent = none).

public Color HeaderAccent { get; set; }

Property Value

Color

HeaderHeight

Height of the header strip.

public float HeaderHeight { get; set; }

Property Value

float

IsCollapsed

Collapsed state.

public bool IsCollapsed { get; set; }

Property Value

bool

IsCollapsible

Shows a chevron and lets a click on the header collapse the content.

public bool IsCollapsible { get; set; }

Property Value

bool

ShowHeaderStrip

Draws the header strip with a tinted background (otherwise only a rule under the title).

public bool ShowHeaderStrip { get; set; }

Property Value

bool

Methods

ArrangeOverride(Rect)

Arranges children inside the final bounds.

protected override void ArrangeOverride(Rect bounds)

Parameters

bounds Rect

MeasureOverride(Size)

Natural size of the content for the available size (margins excluded).

protected override Size MeasureOverride(Size available)

Parameters

available Size

Returns

Size

OnMouseDown(MouseEventArgs)

Mouse button pressed over the element (or captured).

protected override void OnMouseDown(MouseEventArgs e)

Parameters

e MouseEventArgs

OnMouseLeave()

The mouse left the element.

protected override void OnMouseLeave()

OnMouseMove(MouseEventArgs)

Mouse moved over the element (or captured).

protected override void OnMouseMove(MouseEventArgs e)

Parameters

e MouseEventArgs

OnRender(DrawingContext)

Draws the element (below its children).

protected override void OnRender(DrawingContext dc)

Parameters

dc DrawingContext

Events

CollapsedChanged

Raised when the group collapses or expands.

public event Action<GroupBox, bool>? CollapsedChanged

Event Type

Action<GroupBox, bool>