Represents a control consisting of two resizable UIElement objects.

Namespace: DevZest.Windows
Assembly: DevZest.WpfDocking (in DevZest.WpfDocking.dll)


public class SplitContainer : FrameworkElement
Visual Basic
Public Class SplitContainer _
	Inherits FrameworkElement


You can add two UIElement children to the two resizable areas, and you can add other SplitContainer controls to existing SplitContainer to create many resizable display areas.

Use the SplitContainer control to divide the display area of a container (such as a Window) and allow the user to resize UI elements that are added to the SplitContainer panels. When the user passes the mouse pointer over the splitter, the cursor changes to indicate that the controls inside the SplitContainer control can be resized.

Use Child1 and Child2 to specify two resizable children. Use Orientation to specify horizontal orientation. The default orientation of the SplitContainer is vertical.

Use SplitterDistance and IsSplitterTopLeft to specify where the splitter starts. Double click the splitter auto sizes Child1 or Child2, depending on the value of IsSplitterTopLeft. Use ShowsPreview to indicate whether SplitterDistance updated as the user drags the splitter. Use DragIncrement and KeyboardIncrement to specify how far the splitter moves at a time. The default for DragIncrement is 1 and KeyboardIncrement is 10.

Use Child1MinSize and Child2MinSize to specify how close the splitter bar can be moved to the outside edge of a SplitContainer. The default value is 20.

Use SplitterWidth, SplitterPresenterStyle, SplitterTemplate, PreviewTemplate, IsPreviewVisible, PreviewOffsetX and PreviewOffsetY properties to customize the splitter and drag preview.


The following example shows a sample use of SplitContainer.
    Width="300" Height="300">
            <Button Content="Button1"/>
            <dz:SplitContainer Orientation="Horizontal" ShowsPreview="False">
                    <Button Content="Button2"/>
                    <Button Content="Button3"/>

Inheritance Hierarchy

See Also