GroupBox Class
NuGet: GHIElectronics.TinyCLR.UI
Assembly: GHIElectronics.TinyCLR.UI
Namespace: GHIElectronics.TinyCLR.UI.Controls
A titled frame around a single child: draws a labelled border with the header sitting ON the top border line (WinForms/WPF "fieldset" style — the border is broken by a gap around the header text).
public class GroupBox : ContentControl
Properties
Header
public string Header { get; set; }
The title shown above the frame. Uses the inherited Control.Font.
BorderColor
public Color BorderColor { get; set; }
The colour of the frame border.
HeaderColor
public Color HeaderColor { get; set; }
The colour of the header text.
Methods
MeasureOverride(int availableWidth, int availableHeight, out int desiredWidth, out int desiredHeight)
protected override void MeasureOverride(int availableWidth, int availableHeight, out int desiredWidth, out int desiredHeight)
Measures the child plus the header + frame padding.
ArrangeOverride(int arrangeWidth, int arrangeHeight)
protected override void ArrangeOverride(int arrangeWidth, int arrangeHeight)
Arranges the child inside the frame, below the header.
OnRender(DrawingContext dc)
public override void OnRender(DrawingContext dc)
Draws the fieldset frame: the top border runs through the vertical middle of the header text, broken by a gap around it (WinForms/WPF style).