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
Properties
Header
Title.
public string? Header { get; set; }
Property Value
HeaderAccent
Accent bar color at the left of the title (transparent = none).
public Color HeaderAccent { get; set; }
Property Value
HeaderHeight
Height of the header strip.
public float HeaderHeight { get; set; }
Property Value
IsCollapsed
Collapsed state.
public bool IsCollapsed { get; set; }
Property Value
IsCollapsible
Shows a chevron and lets a click on the header collapse the content.
public bool IsCollapsible { get; set; }
Property Value
ShowHeaderStrip
Draws the header strip with a tinted background (otherwise only a rule under the title).
public bool ShowHeaderStrip { get; set; }
Property Value
Methods
ArrangeOverride(Rect)
Arranges children inside the final bounds.
protected override void ArrangeOverride(Rect bounds)
Parameters
boundsRect
MeasureOverride(Size)
Natural size of the content for the available size (margins excluded).
protected override Size MeasureOverride(Size available)
Parameters
availableSize
Returns
OnMouseDown(MouseEventArgs)
Mouse button pressed over the element (or captured).
protected override void OnMouseDown(MouseEventArgs e)
Parameters
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
OnRender(DrawingContext)
Draws the element (below its children).
protected override void OnRender(DrawingContext dc)
Parameters
Events
CollapsedChanged
Raised when the group collapses or expands.
public event Action<GroupBox, bool>? CollapsedChanged