TabIndex not working in ItemsControl.DataTemplate by default
See original GitHub issueI have an ItemsControl with n-TextBoxes which should be accessable by the Tab. Actually it is not working. I also tried to give each TextBox an own TabIndex (TabIndex="{Binding TabIndex}"; 1,2,…). Sadly as you can see in the preview it is not working.
<ItemsControl Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="5" Items="{Binding Path=LocalizedTexts}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition SharedSizeGroup="A" Width="Auto"/>
<ColumnDefinition Width="20"/>
<ColumnDefinition SharedSizeGroup="B" Width="Auto"/>
<ColumnDefinition Width="20"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="{Binding Locale}" VerticalAlignment="Center"/>
<TextBlock Grid.Column="2" Text="{Binding OldText}" VerticalAlignment="Center"/>
<TextBox Grid.Column="4" Text="{Binding Text, Mode=TwoWay}" IsTabStop="True" TabIndex="{Binding TabIndex}"/>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>

Avalonia v0.10.11 on Windows 10
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
WPF TabStop / TabIndex in ItemsControl
It is not complete, but it is a starting point. ... ItemTemplate> </ItemsControl> <Button Content="Fix Tab indexes" Click="Button_Click" ...
Read more >ItemsControl Class (System.Windows.Controls)
If an ItemsPanelTemplate is not specified, the default is used. (For ItemsControl, the default is an ItemsPanelTemplate that specifies a StackPanel.
Read more >ItemsControl Class (System.Windows.Controls)
These elements become items in the Items collection. ... Gets or sets a value that modifies how tabbing and TabIndex work for this...
Read more >Tabbing between items in a ListBox in WPF - Magnus Montin
Once by default. ListBoxItem. The ItemTemplate of the ListBox will be rendered inside a ListBoxItem container. In order to get rid of the...
Read more >ItemsControl Class - Documentation | NoesisGUI
The default value 0 means "do not set AlternationIndex"; A positive value ... HasItems, Gets a value that indicates whether the ItemsControl contains...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I think it is a feature, not a bug. You need to set
KeyboardNavigation.TabNavigationproperty toContinueonItemsPresenter.I think
KeyboardNavigationMode.OnceforItemsControlis the same for WPF isn’t it? See https://stackoverflow.com/questions/1126838/tab-between-list-elements-wpf