Xaml ListView-选项卡仅在嵌套控件中导航
我有一个包含TextBlock和ComboBox的行的列表视图。Xaml ListView-选项卡仅在嵌套控件中导航,xaml,listview,uwp,Xaml,Listview,Uwp,我有一个包含TextBlock和ComboBox的行的列表视图。 我想创建键盘选项卡导航,以便: 在选项卡上-焦点在组合框之间切换 从不选择行(作为控件) 但默认情况下,第一个选项卡上的ListView选择整行,然后集中在组合框上 -------------- Select value: [combo-box-1] -------------- Select value: [combo-box-2] -------------- Select value: [combo-box-3] -----
我想创建键盘选项卡导航,以便:
--------------
Select value:
[combo-box-1]
--------------
Select value:
[combo-box-2]
--------------
Select value:
[combo-box-3]
--------------
ListView的默认值为一次,这意味着容器及其所有子元素作为一个整体只接收一次焦点,因此您需要将其更改为Cycle或Local。此外,如果不想通过按Tab键选择项目,则需要将每个项目的IsTabStop设置为false,在这种情况下,项目将不包括在选项卡导航中
xaml:
......
回答得很好,谢谢!!!我添加了这样的行,鼠标无法点击。
<ListView x:Name="MyListView" TabNavigation="Cycle" ...>
<ListView.ItemContainerStyle>
<Style TargetType="ListViewItem">
<Setter Property="IsTabStop" Value="False"/>
</Style>
</ListView.ItemContainerStyle>
......
</ListView>