Table of Contents

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

Set the panes through First and Second (do not add children directly).

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

first UIElement
second UIElement
orientation Orientation

Properties

DefaultRatio

Ratio restored by a double-click on the splitter.

public float DefaultRatio { get; set; }

Property Value

float

First

Left (or top) pane.

public UIElement? First { get; set; }

Property Value

UIElement

MinFirst

Minimum size of the first pane in DIPs.

public float MinFirst { get; set; }

Property Value

float

MinSecond

Minimum size of the second pane in DIPs.

public float MinSecond { get; set; }

Property Value

float

Orientation

Panes side by side (Horizontal) or stacked.

public Orientation Orientation { get; set; }

Property Value

Orientation

Ratio

Share of the space given to the first pane (0..1).

public float Ratio { get; set; }

Property Value

float

Second

Right (or bottom) pane.

public UIElement? Second { get; set; }

Property Value

UIElement

SplitterThickness

Thickness of the splitter (grab zone) in DIPs.

public float SplitterThickness { get; set; }

Property Value

float

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

Events

RatioChanged

Raised when the ratio changes.

public event Action<SplitView, float>? RatioChanged

Event Type

Action<SplitView, float>