clysmic
Topic Author
Posts: 4
Joined: 14 Jan 2022, 17:51

KeyboardNavigation failing to focus "off-screen" controls inside a ScrollViewer

14 Jan 2022, 18:11

<Grid x:Name="MainGrid" KeyboardNavigation.DirectionalNavigation="Cycle">
    <ScrollViewer CanContentScroll="True" Focusable="False">
        <StackPanel>
            <!-- 10 focusable controls defined here. (Sliders, toggles, etc.). Lets call them C0, C1, C2,... through C9 -->
        </StackPanel>
    </ScrollViewer>
    <Border
        <Button x:Name="OkButton"/>
    </Border>
</Grid>
I have something resembling the above XAML. Focus starts on C0. The goal is that you can navigate C0-C9 with the keyboard. If you press down when you are focused on C9, focus should cycle to the OkButton, and vice versa if you are focused on the OkButton and press up. Lastly, down on OkButton should move focus back up to C0, and likewise up on C0 should wrap to OkButton.

What I've described above is exactly how it works in Blend and WPF. However, in Noesis, I am observing something different. Let's say that the scrollable view is only big enough to display 3 controls (C0 - C2). In Noesis, when I am focused on C2 and press down, it focuses the OkButton. It should be scrolling down a bit and focusing C3! If the window is scrolled enough for any part of C3 to be visible, it would scroll down and focus it, but if it's not visible it is getting skipped! I think this is a bug in how Noesis is choosing what control to target with navigation commands.

Image
 
User avatar
sfernandez
Site Admin
Posts: 2569
Joined: 22 Dec 2011, 19:20

Re: KeyboardNavigation failing to focus "off-screen" controls inside a ScrollViewer

17 Jan 2022, 10:56

If the behavior is different from WPF then it is a bug in Noesis, could you please report it in our bugtracker?
 
clysmic
Topic Author
Posts: 4
Joined: 14 Jan 2022, 17:51

Re: KeyboardNavigation failing to focus "off-screen" controls inside a ScrollViewer

18 Jan 2022, 16:24

Edit: done. #2242
 
User avatar
jsantos
Site Admin
Posts: 3456
Joined: 20 Jan 2012, 17:18
Contact:

Re: KeyboardNavigation failing to focus "off-screen" controls inside a ScrollViewer

19 Jan 2022, 12:48

Thanks for the report!

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 2 guests