SplitterItem.EndInit() Method

Ends the item's initialization.

Namespace: DevExpress.XtraLayout

Assembly: DevExpress.XtraLayout.v20.1.dll

Declaration

public override void EndInit()
Public Overrides Sub

Remarks

Use the SplitterItem.BeginInit and EndInit methods, to prevent the splitter item from being used until it has been completely initialized.

Examples

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