SplitContainer Class |
System.WindowsDependencyObject
System.Windows.MediaVisual
System.WindowsUIElement
System.WindowsFrameworkElement
DevZest.WindowsSplitContainer
Namespace: DevZest.Windows
Assembly: DevZest.WpfDocking (in DevZest.WpfDocking.dll) Version: 2.5.0.0 (2.5.5912.0)
The SplitContainer type exposes the following members.
Name | Description | |
---|---|---|
SplitContainer | Initializes a new instance of the SplitContainer class. |
Name | Description | |
---|---|---|
Background | Gets or sets the Brush used to fill the background. This is a dependency property. | |
Child1 | Gets or sets the left or top child of the SplitContainer, depending on Orientation. This is a dependency property. | |
Child1MinSize |
Gets or sets the minimum distance, in device-independent units (1/96th inch per unit),
of the splitter from the left or top edge of SplitContainer.
This is a dependency property.
| |
Child2 | Gets or sets the right or bottom child of the SplitContainer, depending on Orientation. This is a dependency property. | |
Child2MinSize |
Gets or sets the minimum distance, in device-independent units (1/96th inch per unit),
of the splitter from the right or bottom edge of SplitContainer.
This is a dependency property.
| |
DragIncrement | Gets or sets the minimum distance that a user must use the mouse to drag the splitter. This is a dependency property. | |
IsPreviewVisible | Gets the value indicates whether the preview is visible. This is a dependency property. | |
IsSplitterTopLeft | Gets or sets a value indicating whether the SplitterDistance property specifies the size of Child1 or Child2. This is a dependency property. | |
KeyboardIncrement | Gets or sets the distance that each press of an arrow key moves the splitter. This is a dependency property. | |
Orientation | Gets or sets a value indicating the horizontal or vertical orientation of the SplitContainer children. This is a dependency property. | |
PreviewOffsetX | Gets the X-axis value of the drag preview offset. This is a dependency property. | |
PreviewOffsetY | Gets the Y-axis value of the drag preview offset. This is a dependency property. | |
PreviewTemplate | Gets or sets the DataTemplate of the dragging preview. | |
ShowsPreview | Gets or sets a value that indicates whether the SplitContainer updates SplitterDistance as the user drags the splitter. This is a dependency property. | |
SplitterDistance | Gets or sets a value indicating the size of Child1 or Child2, depending on the value of IsSplitterTopLeft. This is a dependency property. | |
SplitterPresenter | Gets the ContentPresenter of the splitter. This is a dependency property. | |
SplitterPresenterStyle | Gets or sets the splitter ContentPresenter. This is a dependency property. | |
SplitterTemplate | Gets or sets the data template of the splitter (movable bar). This is a dependency property. | |
SplitterWidth | Gets or sets the width of the splitter, in device-independent units (1/96th inch per unit). This is a dependency property. |
Name | Description | |
---|---|---|
BackgroundProperty | Identifies the Background dependency property. | |
Child1MinSizeProperty | Identifies the Child1MinSize dependency property. | |
Child1Property | Identifies the Child1 dependency property. | |
Child2MinSizeProperty | Identifies the Child2MinSize dependency property. | |
Child2Property | Identifies the Child2 dependency property. | |
DragIncrementProperty | Identifies the DragIncrement dependency property. | |
IsPreviewVisibleProperty | Identifies the IsPreviewVisible dependency property. | |
IsSplitterTopLeftProperty | Identifies the IsSplitterTopLeft dependency property. | |
KeyboardIncrementProperty | Identifies the KeyboardIncrement dependency property. | |
OrientationProperty | Identifies the Orientation dependency property. | |
PreviewOffsetXProperty | Identifies the PreviewOffsetX dependency property. | |
PreviewOffsetYProperty | Identifies the PreviewOffsetY dependency property. | |
PreviewTemplateProperty | Identifies the PreviewTemplate dependency property. | |
ShowsPreviewProperty | Identifies the ShowsPreview dependency property. | |
SplitterDistanceProperty | Identifies the SplitterDistance dependency property. | |
SplitterPresenterProperty | Identifies the SplitterPresenter dependency property. | |
SplitterPresenterStyleProperty | Identifies the SplitterPresenterStyle dependency property. | |
SplitterTemplateProperty | Identifies the SplitterTemplate dependency property. | |
SplitterWidthProperty | Identifies the SplitterWidth dependency property. |
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.
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:dz="http://schemas.devzest.com/presentation" Width="300" Height="300"> <dz:SplitContainer> <dz:SplitContainer.Child1> <Button Content="Button1"/> </dz:SplitContainer.Child1> <dz:SplitContainer.Child2> <dz:SplitContainer Orientation="Horizontal" ShowsPreview="False"> <dz:SplitContainer.Child1> <Button Content="Button2"/> </dz:SplitContainer.Child1> <dz:SplitContainer.Child2> <Button Content="Button3"/> </dz:SplitContainer.Child2> </dz:SplitContainer> </dz:SplitContainer.Child2> </dz:SplitContainer> </Window>