LayoutGroup.SelectedTabIndex Property
Gets or sets the index of the selected tabbed child among visible children. This member is in effect when the current group is rendered as a tabbed group. This is a dependency property.
Namespace: DevExpress.Xpf.LayoutControl
Assembly: DevExpress.Xpf.LayoutControl.v24.2.dll
NuGet Package: DevExpress.Wpf.LayoutControl
Declaration
Property Value
Type | Description |
---|---|
Int32 | A zero-based integer that specifies the index of the selected tabbed child among visible children. |
Remarks
The SelectedTabIndex member is in effect when the group is represented as a tabbed group (the LayoutGroup.View property is set to LayoutGroupView.Tabs).
You can use the SelectedTabIndex property to select a specific tab. Another way to select a tab is to use the LayoutGroup.SelectTab method.
The following code sample opens the tab2 LayoutGroup’s tab on an applicatoin startup:
<Window ...
xmlns:lc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol">
<Grid x:Name="LayoutRoot" Background="White">
<lc:LayoutControl Orientation="Vertical" Background="#FFEAEAEA" >
<lc:LayoutGroup Orientation="Horizontal">
<lc:LayoutGroup Orientation="Vertical">
<!-- ... -->
</lc:LayoutGroup>
<lc:LayoutGroup View="Tabs" x:Name="tabbedgroup">
<lc:LayoutGroup Header="Tab 1" Orientation="Vertical" x:Name="tab1">
<lc:LayoutItem Label="Item 5:">
<TextBox Width="100" />
</lc:LayoutItem>
<lc:LayoutItem Label="Item 6:" >
<TextBox/>
</lc:LayoutItem>
<lc:LayoutItem Label="Item 7:" >
<TextBox/>
</lc:LayoutItem>
</lc:LayoutGroup>
<lc:LayoutGroup Header="Tab 2" x:Name="tab2">
<lc:LayoutItem Label="Item 8:">
<TextBox/>
</lc:LayoutItem>
<lc:LayoutItem Label="Item 9:">
<TextBox/>
</lc:LayoutItem>
</lc:LayoutGroup>
</lc:LayoutGroup>
</lc:LayoutGroup>
<!-- ... -->
</lc:LayoutControl>
</Grid>
</Window>