Skip to main content

SplitterItem(LayoutControlGroup) Constructor

Initializes a new instance of the SplitterItem class with the specified parent.

Namespace: DevExpress.XtraLayout

Assembly: DevExpress.XtraLayout.v24.2.dll

Declaration

public SplitterItem(
    LayoutControlGroup parent
)

Parameters

Name Type Description
parent LayoutControlGroup

A LayoutControlGroup object that owns the new splitter item.

Example

The following sample code demonstrates how to create a simple layout. The SplitterItem is used to separate Item1 and Group3.

The result is shown in the image below:

SplitterItemExample

using DevExpress.XtraLayout;

...

LayoutControl layoutControl = new LayoutControl();
layoutControl.Dock = DockStyle.Fill;
layoutControl.Root.TextVisible = false;

LayoutControlGroup group1 = new LayoutControlGroup();
LayoutControlGroup group2 = new LayoutControlGroup();
LayoutControlGroup group3 = new LayoutControlGroup();

group1.Name = "Group1";
group2.Name = "Group2";
group3.Name = "Group3";

layoutControl.Root.Add(group1);
layoutControl.Root.Add(group2);

SplitterItem split = new SplitterItem();
// Starts the SplitterItem's initialization.
split.BeginInit();

LayoutControlItem item =new LayoutControlItem(); 
DevExpress.XtraEditors.ComboBoxEdit combo = new DevExpress.XtraEditors.ComboBoxEdit();
item.Control = combo;
item.Text = "Item1";

group2.AddItem(item);
group2.AddItem(split);
group2.AddItem(group3);
split.Move(item, DevExpress.XtraLayout.Utils.InsertType.Right);
group3.Move(split, DevExpress.XtraLayout.Utils.InsertType.Right);

// Ends the SplitterItem's initialization.
split.EndInit();

this.Controls.Add(layoutControl);
See Also