DockPanel.Tabbed Property

Gets or sets whether the current panel represents a tab container.

Namespace: DevExpress.XtraBars.Docking

Assembly: DevExpress.XtraBars.v20.1.dll

Declaration

[DefaultValue(false)]
[XtraSerializableProperty]
public bool Tabbed { get; set; }
<DefaultValue(False)>
<XtraSerializableProperty>
Public Property Tabbed As Boolean

Property Value

Type Default Description
Boolean

false

true if the current panel represents a tab container; otherwise, false.

Remarks

Panels can contain other panels as children. By default child panels are arranged within the parent panel side by side and thus the parent panel represents a split container. The split container's Tabbed property always returns false. By setting the Tabbed property to true the split container is transformed into a tab container (child panels will be arranged as tab pages). Conversely by setting the Tabbed property to false the tab container is transformed into a split container.

Note: changing the Tabbed property is in effect only for the panels which own other panels (the DockPanel.Count property must be greater than zero). Such panels are automatically created when dock panels are added to other panels.

To form a tab container, the DockPanel.DockAsTab method can also be used.

Examples

In the following example three panels are created and docked to form a split container. Then the DockPanel.Tabbed property of the split container is set to true and this transforms the split container into a tab container. The result is shown below:

DockPanel_ParentPanel_ex

using DevExpress.XtraBars.Docking;
// ...
// Create a panel and dock it to the left edge of the form.
DockPanel p1 = dockManager1.AddPanel(DockingStyle.Left);
p1.Text = "Panel 1";
// Add a button to the panel.
DevExpress.XtraEditors.SimpleButton btn = new DevExpress.XtraEditors.SimpleButton();
btn.Text = "Print...";
p1.ControlContainer.Controls.Add(btn);

// Add a new panel to the first panel. This forms a split container.
DockPanel p2 = p1.AddPanel();
p2.Text = "Panel 2";

// Add a new panel to the split container.
DockPanel p3 = p1.ParentPanel.AddPanel();
p3.Text = "Panel 3";
// ...

// Transform the split container into a tab container.
p1.ParentPanel.Tabbed = true;
See Also