Table of Contents

Class SplitterPanel

Namespace
Alternet.UI
Assembly
Alternet.UI.dll

This control manages up to two subcontrols which are aligned vertically or horizontally with splitter control between them. The current view of the control can be split into two programmatically, and unsplit either programmatically or via the user interface.

[ControlCategory("Containers")]
public class SplitterPanel : Control, IBaseObject, IDisposableObject, IInputElement, ISupportInitialize, IFocusable, IWin32Window, ITextProperty, IComponent, IDisposable
Inheritance
SplitterPanel
Implements
Extension Methods

Examples

Here is how to declare a SplitterPanel in UIXML:

<SplitterPanel Name="panel" SplitMethod="Vertical" MinPaneSize="150">
  <ListBox Name="listBox1"/>
  <ListBox Name="listBox2"/>
</SplitterPanel>

Also, a SplitterPanel can be created from code:

var splitterPanel = new Alternet.UI.SplitterPanel();
ListBox listBox3 = new();
ListBox listBox4 = new();

listBox3.Items.Add("listBox3");
listBox4.Items.Add("listBox4");

splitterPanel.Children.Add(listBox3);
splitterPanel.Children.Add(listBox4);

splitterPanel.SplitHorizontal(listBox3, listBox4, 350);

Children.Add(splitterPanel);

Remarks

Example of how a SplitterPanel can look:

SplitterPanel

Constructors

SplitterPanel()

Initializes a new instance of the SplitterPanel class.

Fields

ApplyMinSashSize

Gets or sets whether to check sash size and make it at least equal to MinSplitterSashSize.

Properties

CanDoubleClick

Gets or sets whether double click unsplits the control.

CanMoveSplitter

Gets or sets whether splitter sash can be dragged by mouse.

Control1

Returns the left/top or only pane.

Control2

Returns the right/bottom pane.

ControlKind

Returns control identifier.

CreateStyle

Defines visual style and behavior of the SplitterPanel control.

DefaultCreateStyle

Defines default visual style for the newly created SplitterPanel controls.

DefaultSashSize

Gets the default sash size in pixels. Returns value for the native control.

IsSplit

Gets whether the control is split.

IsSplitHorizontal

Gets or sets whether the control is split horizontally.

IsSplitVertical

Gets or sets whether the control is split vertically.

MaxSashPosition

Gets maximal splitter sash position if control is splitted or -1 if it's unsplitted.

MinPaneSize

Gets or sets the minimum pane size in pixels (defaults to zero).

RedrawOnSashPosition

Gets or sets whether to resize the panes and redraw the sash and border on SashPosition property change.

SashGravity

Gets or sets the sash gravity. Value between 0.0 and 1.0.

SashPosition

Gets or sets the sash position in pixels.

SashPositionDip

Gets or sets the sash position in device-independent units (1/96th inch per unit).

SashSize

Gets current sash size in pixels.

SashVisible

Gets or sets whether the sash should be invisible, even when the control is split.

SplitMethod

Gets or sets SplitterPanel automatic behavior when child controls are added.

Methods

DoUnsplit(Control?)

Leaves only one control inside the SplitterPanel.

InitUnsplitted(Control)

Initializes the SplitterPanel to have one pane. The child control is shown if it is currently hidden.

OnChildInserted(Control)

Called when a Control is inserted into the Children.

OnChildRemoved(Control)

Called when a Control is removed from the Children collections.

OnLayout()

Called when the control should reposition its child controls.

OnSplitterDoubleClick(SplitterPanelEventArgs)

Called when the splitter sash is double clicked.

OnSplitterMoved(SplitterPanelEventArgs)

Called when the splitter sash is moved.

OnSplitterMoving(SplitterPanelEventArgs)

Called when the splitter sash is in the process of moving.

OnSplitterResize(SplitterPanelEventArgs)

Called when the splitter sash is moved.

OnUnsplit(SplitterPanelEventArgs)

Called when the control is unsplit.

ReplaceControl(Control?, Control?)

Replaces one of the controls managed by the SplitterPanel with another one.

SetMinSashSize(int)

Sets minimal value for the sash size in dips (1/96 inch).

SplitHorizontal(Control?, Control?, int)

Initializes the top and bottom panes of the SplitterPanel. The child controls are shown if they are currently hidden.

SplitHorizontalDip(Control?, Control?, double)

Initializes the top and bottom panes of the SplitterPanel. The child controls are shown if they are currently hidden.

SplitVertical(Control?, Control?, int)

Initializes the left and right panes of the SplitterPanel. The child controls are shown if they are currently hidden.

SplitVerticalDip(Control?, Control?, double)

Initializes the left and right panes of the SplitterPanel. The child controls are shown if they are currently hidden.

UpdateSize()

Causes any pending sizing of the sash and child panes to take place immediately.

Events

SplitterDoubleClick

Occurs when the splitter sash is double clicked.

SplitterMoved

Occurs when the splitter sash is moved.

SplitterMoving

Occurs when the splitter sash is in the process of moving.

SplitterResize

Occurs when the splitter sash is resized.

Unsplit

Occurs when the control is unsplit.