windowsforms-devexpress-dot-xtraeditors-d19465b3.md
Allows a user to resize controls docked to the splitter’s edges.
Namespace : DevExpress.XtraEditors
Assembly : DevExpress.Utils.v25.2.dll
NuGet Packages : DevExpress.Utils, DevExpress.Wpf.Core
public class SplitterControl :
Splitter,
ISupportLookAndFeel,
IXtraSerializable,
IXtraSerializable2,
ISupportAppearanceObjectPropertiesFilter
Public Class SplitterControl
Inherits Splitter
Implements ISupportLookAndFeel,
IXtraSerializable,
IXtraSerializable2,
ISupportAppearanceObjectPropertiesFilter
The SplitterControl functions as the Splitter class. A splitter can be placed between two controls to resize the areas occupied by these controls.
The SplitterControl also supports the look and feel mechanism and appearances (accessible through SplitterControl.LookAndFeel and SplitterControl.Appearance properties).
The area to the left or right of the splitter cannot exceed the resized control’s maximum width. To specify a minimum allowed area width, set the splitter’s MinSize and MinExtra properties.
Tip
As an alternative, you can use the SplitContainerControl class. It consists of two panels separated by a splitter.
Dock property to DockStyle.Left.SplitterControl on the form and set the splitter’s Dock property to DockStyle.Left.Dock property to DockStyle.Fill.The following code snippet creates a layout with two controls divided by a vertical SplitterControl.
using DevExpress.XtraBars.Navigation;
using DevExpress.XtraEditors;
using DevExpress.XtraGrid;
namespace splitter {
public partial class Form1 : XtraForm {
GridControl grid;
SplitterControl splitter;
AccordionControl accordion;
public Form1() {
InitializeComponent();
// Create an Accordion and dock it to the left
accordion = new AccordionControl();
accordion.Dock = DockStyle.Left;
var salesItem = accordion.AddItem();
salesItem.Text = "Sales";
// Create a Splitter and also dock it to the left
splitter = new SplitterControl();
splitter.Dock = DockStyle.Left;
// Create a Grid and dock it to fill the remaining space
grid = new GridControl();
grid.Dock = DockStyle.Fill;
// Add controls to the form in inverted order (from right to left)
this.Controls.AddRange(new Control[] { grid, splitter, accordion });
}
}
}
Imports DevExpress.XtraBars.Navigation
Imports DevExpress.XtraEditors
Imports DevExpress.XtraGrid
Namespace splitter
Public Partial Class Form1
Inherits XtraForm
Private grid As GridControl
Private splitter As SplitterControl
Private accordion As AccordionControl
Public Sub New()
InitializeComponent()
' Create an Accordion and dock it to the left
accordion = New AccordionControl()
accordion.Dock = DockStyle.Left
Dim salesItem = accordion.AddItem()
salesItem.Text = "Sales"
' Create a Splitter and also dock it to the left
splitter = New SplitterControl()
splitter.Dock = DockStyle.Left
' Create a Grid and dock it to fill the remaining space
grid = New GridControl()
grid.Dock = DockStyle.Fill
' Add controls to the form in inverted order (from right to left)
Me.Controls.AddRange(New Control() {grid, splitter, accordion})
End Sub
End Class
End Namespace
Object MarshalByRefObject Component Control Splitter SplitterControl
See Also