Class SplitView
- Namespace
- PluginUI
- Assembly
- PluginUI.dll
Two panes separated by a draggable splitter. Horizontal places the panes side by side (vertical splitter), Vertical stacks them. Double-click the splitter to restore DefaultRatio.
public class SplitView : Panel
- Inheritance
-
SplitView
- Inherited Members
Remarks
Constructors
SplitView()
Creates a split view.
public SplitView()
SplitView(UIElement, UIElement, Orientation)
Creates a split view with two panes.
public SplitView(UIElement first, UIElement second, Orientation orientation = Orientation.Horizontal)
Parameters
firstUIElementsecondUIElementorientationOrientation
Properties
DefaultRatio
Ratio restored by a double-click on the splitter.
public float DefaultRatio { get; set; }
Property Value
First
Left (or top) pane.
public UIElement? First { get; set; }
Property Value
MinFirst
Minimum size of the first pane in DIPs.
public float MinFirst { get; set; }
Property Value
MinSecond
Minimum size of the second pane in DIPs.
public float MinSecond { get; set; }
Property Value
Orientation
Panes side by side (Horizontal) or stacked.
public Orientation Orientation { get; set; }
Property Value
Ratio
Share of the space given to the first pane (0..1).
public float Ratio { get; set; }
Property Value
Second
Right (or bottom) pane.
public UIElement? Second { get; set; }
Property Value
SplitterThickness
Thickness of the splitter (grab zone) in DIPs.
public float SplitterThickness { 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
Events
RatioChanged
Raised when the ratio changes.
public event Action<SplitView, float>? RatioChanged