Back to Devexpress

LayoutGroup.SelectedTabIndex Property

wpf-devexpress-dot-xpf-dot-docking-dot-layoutgroup-46cdab1e.md

latest3.4 KB
Original Source

LayoutGroup.SelectedTabIndex Property

Gets or sets the index of the active child item. This property is supported for groups that display its children as tabs. This is a dependency property.

Namespace : DevExpress.Xpf.Docking

Assembly : DevExpress.Xpf.Docking.v25.2.dll

NuGet Package : DevExpress.Wpf.Docking

Declaration

csharp
public int SelectedTabIndex { get; set; }
vb
Public Property SelectedTabIndex As Integer

Property Value

TypeDescription
Int32

The index of the active tab.

|

Remarks

Use the LayoutGroup.SelectedItem property to get the selected item.

The following code sample activates the second LayoutPanel in the TabbedGroup.

xaml
<dx:ThemedWindow
  ...
  xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking"
  xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core">
  <dxdo:DockLayoutManager>
    <dxdo:LayoutGroup Caption="LayoutRoot">
      <dxdo:TabbedGroup SelectedTabIndex="1">
        <dxdo:LayoutPanel Caption="Error List"/>
        <dxdo:LayoutPanel Caption="Output"/>
        <dxdo:LayoutPanel Caption="Find Results"/>
        <dxdo:LayoutPanel Caption="Solution Explorer"/>
      </dxdo:TabbedGroup>
    </dxdo:LayoutGroup>
  </dxdo:DockLayoutManager>
</dx:ThemedWindow>

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SelectedTabIndex property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-docklayoutmanager-load-an-external-window-or-usercontrol-into-a-documentpanel/CS/DocumentPanel_Content/MainWindow.xaml#L34

xml
<dxdo:LayoutGroup>
    <dxdo:DocumentGroup x:Name="documentGroup1" SelectedTabIndex="1" DestroyOnClosingChildren="False" MDIStyle="MDI">
        <dxdo:DocumentPanel x:Name="docPanel1" Caption="Panel 1" MDISize="300,250"/>

See Also

Activate Methods

SelectedItem

SelectedItemChanged

GroupBorderStyle

LayoutGroup Class

LayoutGroup Members

DevExpress.Xpf.Docking Namespace