У меня есть окно / форма WPF с различными элементами управления.
Я установил табличные индексы в нужном порядке, но получаю странное поведение.
При переходе по окну, порядок долженбыть следующим: сначала текстовые поля слева, затем элементы управления датой справа, затем элементы управления вкладками и вкладки, а затем только кнопки.
Но элемент управления вкладками пропускается и фокус перемещаетсяпрямо на кнопки.Если я продолжу вкладку после кнопок, то будет выбран элемент управления вкладкой.
Ниже приведен xmal.
Любая помощь приветствуется.
<Window xmlns:my="clr-namespace:DevExpress.Xpf.Editors;assembly=DevExpress.Xpf.Core.v10.1" x:Class="TabStopIssue.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
Title="MainWindow" Height="350" Width="525">
<Grid>
<Grid >
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="3*" />
<ColumnDefinition Width="3*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Label Grid.Row="1" Grid.Column="0" Content="Name"/>
<dxe:ComboBoxEdit Grid.Row="1" Grid.Column="1" Text="" TabIndex="0" />
<Label Grid.Row="2" Grid.Column="0" Content="Description"/>
<dxe:TextEdit Grid.Row="2" Grid.Column="1" TabIndex="1" />
<Label Grid.Row="1" Grid.Column="2" Content="From Date"/>
<dxe:DateEdit Grid.Row="1" Grid.Column="3" TabIndex="2" />
<Label Grid.Row="2" Grid.Column="2" Content="ToDate"/>
<dxe:DateEdit Grid.Row="2" Grid.Column="3" TabIndex="3" />
</Grid>
<Grid Grid.Row="1">
<TabControl TabIndex="4">
<TabItem Header="Tab1" TabIndex="5">
<Grid >
<TextBox>Enter Text Here</TextBox>
</Grid>
</TabItem>
<TabItem Header="Tab2" TabIndex="6">
<Grid >
<TextBox>Enter Text Here</TextBox>
</Grid>
</TabItem>
<TabItem Header="tab3" TabIndex="7">
<Grid >
<TextBox>Enter Text Here</TextBox>
</Grid>
</TabItem>
<TabItem Header="tab4" TabIndex="8">
<Grid >
<TextBox>Enter Text Here</TextBox>
</Grid>
</TabItem>
<TabItem Header="tab5" TabIndex="9">
<Grid >
<TextBox>Enter Text Here</TextBox>
</Grid>
</TabItem>
</TabControl>
</Grid>
<Grid Grid.Row="2">
<StackPanel HorizontalAlignment="Right">
<Button Content="Button1" IsDefault="True" TabIndex="10" />
<Button Content="Button2" TabIndex="11" />
<Button Content="button3" IsCancel="True" TabIndex="12" />
</StackPanel>
</Grid>
</Grid>
</Grid>
</Window>