Table of Contents

Class SplitPane

Namespace
Myra.Graphics2D.UI
Assembly
Myra.dll

An abstract base class for split pane containers that divide space between child widgets with moveable splitter handles.

public abstract class SplitPane : Container, IItemWithId, INotifyAttachedPropertyChanged, IContainer
Inheritance
SplitPane
Implements
Derived
Inherited Members

Constructors

SplitPane(Stylesheet, string)

Initializes a new instance of the SplitPane class with the specified stylesheet and style.

protected SplitPane(Stylesheet stylesheet, string styleName)

Parameters

stylesheet Stylesheet

The stylesheet to use for applying the style.

styleName string

The name of the style to apply to the split pane.

SplitPane(string)

Initializes a new instance of the SplitPane class.

protected SplitPane(string styleName)

Parameters

styleName string

The name of the style to apply to the split pane.

Properties

HandleStyle

Gets or sets the style applied to the splitter handle buttons.

[Browsable(false)]
public SplitPanelButtonStyle HandleStyle { get; }

Property Value

SplitPanelButtonStyle

Orientation

Gets the orientation (horizontal or vertical) of the split pane.

[Browsable(false)]
public abstract Orientation Orientation { get; }

Property Value

Orientation

Widgets

Gets the collection of child widgets in the split pane.

[Browsable(false)]
public override IList<Widget> Widgets { get; }

Property Value

IList<Widget>

Methods

ApplyStyle(WidgetStyle)

Applies the specified widget style to this split pane.

protected override void ApplyStyle(WidgetStyle style)

Parameters

style WidgetStyle

The widget style to apply.

CopyFrom(Widget)

Copies the style and properties from another split pane.

protected override void CopyFrom(Widget w)

Parameters

w Widget

The source split pane to copy from.

GetProportion(int)

Gets the proportion (size ratio) of the widget at the specified index.

public float GetProportion(int widgetIndex)

Parameters

widgetIndex int

The index of the widget.

Returns

float

The proportion value, or 0 if the index is out of range.

GetSplitterPosition(int)

Gets the position of the splitter between two widgets as a proportion (0.0 to 1.0).

public float GetSplitterPosition(int leftWidgetIndex)

Parameters

leftWidgetIndex int

The index of the widget to the left/top of the splitter.

Returns

float

The splitter position as a proportion of total space.

OnTouchMoved()

Handles touch/mouse movement for dragging splitter handles to resize sections.

public override void OnTouchMoved()

Reset()

Reinitializes the split pane layout based on the current widgets and handle style.

public void Reset()

SetSplitterPosition(int, float)

Sets the position of the splitter between two widgets.

public void SetSplitterPosition(int leftWidgetIndex, float proportion)

Parameters

leftWidgetIndex int

The index of the widget to the left/top of the splitter.

proportion float

The splitter position as a proportion (0.0 to 1.0).

Events

ProportionsChanged

Occurs when the splitter positions change.

public event MyraEventHandler ProportionsChanged

Event Type

MyraEventHandler