Class Splitter
Provides resizing of docked elements. You can dock some control to an edge of a container using Dock property, and then dock the splitter to the same edge. The splitter resizes the control that is previous in the docking order.
public class Splitter : GraphicControl, IBaseObject, IDisposableObject, ISupportInitialize, IFocusable, ITextProperty, IComponent, IControl, IDisposable, IWin32Window, INotifyDataErrorInfo
- Inheritance
-
Splitter
- Implements
Examples
Here is how to declare a Splitter in UIXML:
<LayoutPanel>
<Panel Dock="Fill" Name="fillPanel"/>
<Splitter Dock="Top"/>
<ListBox Dock="Top" MinHeight="200" Name="topListBox"/>
</LayoutPanel>
Also, a Splitter can be created from code:
LayoutPanel panel = new();
ListBox listBox1 = new()
{
Dock = DockStyle.Fill,
Parent = panel,
};
listBox1.Add("Fill");
Splitter splitter = new()
{
Dock = DockStyle.Right,
Parent = panel,
};
ListBox listBox2 = new()
{
Dock = DockStyle.Right,
Parent = panel,
MinWidth = 250,
};
listBox2.Add("Right");
panel.Parent = fillPanel;
Constructors
- Splitter()
Initializes a new instance of the Splitter class.
Fields
- DefaultDarkColors
Gets or sets default splitter background and line color for the dark color theme.
- DefaultLightColors
Gets or sets default splitter background and line color for the light color scheme.
- DefaultWidth
Gets or sets default splitter width.
Properties
- DefaultCursor
Gets default splitter cursor.
- Dock
Gets or sets which control borders are docked to its parent control and determines how a control is resized with its parent.
- Horizontal
Gets whether the splitter is horizontal.
- MinExtra
Gets or sets minimum size (in dips) of the remaining area of the container. This area is located in the center of the container that is not occupied by edge docked controls. This is the area that would be used for any Fill docked control.
- MinSize
Gets or sets the minimum size (in dips) of the target of the splitter. The target of a splitter is the control that is previous in the docking order
- NormalColors
Gets or sets splitter background and line color when control state is Normal.
- SizeDelta
Gets or sets number of dips on which splitter needs to be moved in order to update attached control size.
- SplitPosition
Gets or sets the position of the splitter.
Methods
- DefaultPaint(Graphics, RectD)
Default painting method of the UserControl and its descendants.
- OnKeyDown(KeyEventArgs)
Called when the KeyDown event is raised.
- OnMouseCaptureLost(EventArgs)
Called when the control loses mouse capture.
- OnMouseDown(MouseEventArgs)
Called when the mouse button was pressed.
- OnMouseMove(MouseEventArgs)
Called when the mouse is moved.
- OnMouseUp(MouseEventArgs)
Called when the mouse button was released.
- OnSplitterMoved(SplitterEventArgs)
Raises the SplitterMoved event. This event occurs when the user finishes moving the splitter.
- OnSplitterMoving(SplitterEventArgs)
Raises the SplitterMoving event. This event occurs while the splitter is being moved by the user.
- ToString()
Returns a string representation for this control.
Events
- SplitterMoved
Occurs when the splitter control is moved.
- SplitterMoving
Occurs when the splitter control is in the process of moving.