[noesis:MoveFocusAction] Direction="Down" doesn't work properly with KeyboardNavigation.TabNavigation="Cycle"
Posted: 11 Mar 2025, 09:25
Hi! I found that the focus with Direction="Down" does not shift from the last element to the first when KeyboardNavigation.TabNavigation="Cycle" is enabled.
With Direction="Up" this problem does not occur, the focus moves smoothly from the first element to the last.
Here is a minimal example to reproduce this problem:
With Direction="Up" this problem does not occur, the focus moves smoothly from the first element to the last.
Here is a minimal example to reproduce this problem:
Code: Select all
<Page x:Name="Test"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:system="clr-namespace:System;assembly=mscorlib"
xmlns:noesis="clr-namespace:NoesisGUIExtensions;assembly=Noesis.GUI.Extensions">
<StackPanel Orientation="Horizontal">
<ListView x:Name="TheListView1" SelectionMode="Single" KeyboardNavigation.TabNavigation="Cycle">
<b:Interaction.Triggers>
<b:KeyTrigger Key="D1">
<noesis:MoveFocusAction Direction="Down" />
</b:KeyTrigger>
</b:Interaction.Triggers>
<ListViewItem>Element 1</ListViewItem>
<ListViewItem>Element 2</ListViewItem>
<ListViewItem>Element 3</ListViewItem>
<ListViewItem>Element 4</ListViewItem>
</ListView>
</StackPanel>
</Page>