Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8847249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:09:05+00:00 2026-06-14T12:09:05+00:00

Suppose you have a StackPanel, which contains a ScrollViewer which contains another StackPanel with

  • 0

Suppose you have a StackPanel, which contains a ScrollViewer which contains another StackPanel with an ItemsControl with a bound ItemsSource. This ItemsSource is bound to a collection of Grids created at runtime. Each Grid contains a label and a textbox/combobox/a few checkboxes that all have a unique TabIndex value within the StackPanel.
Here is the xaml:

<ScrollViewer Name="scrollViewer" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
  <StackPanel Name="stackPanel" MinWidth="500" Width="Auto">
    <ItemsControl Name="itemsControl"                          ItemsSource="{Binding ElementName=SomeWindow, Path=GridsCollection,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
  </StackPanel>
</ScrollViewer>

I want to simply tab from one control to the next, but only within the controls in the grids in the grids collection. So far I’ve tried different KeyboardNavigation.TabNavigation settings but without any luck. What is the best way to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T12:09:05+00:00Added an answer on June 14, 2026 at 12:09 pm

    Set TabNavigation to KeyboardNavigationMode.Cycle for each container you want to behave like that, so the focus won’t escape it as long as you use Tab and Shift+Tab:

    KeyboardNavigation.SetTabNavigation(grid1, KeyboardNavigationMode.Cycle);
    

    If you want to change Ctrl+Tab behaviour, use KeyboardNavigation.SetControlTabNavigation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose I have an element (in my case, a StackPanel ) that contains several
I'm a little puzzled with this one. I have a Collection called AllProducts, which
Suppose that I have this XAML code : <StackPanel> <s:SurfaceTextBox Name=A /> <s:SurfaceTextBox Name=B
Suppose we have a WPF element, for instance StackPanel with Buttons, Textboxes etc. inside.
I have the following structure in XAML: <Grid> <ItemsControl x:Name=Items ItemsSource={Binding Path=Pages} Grid.Row=0 Grid.Column=0>
Suppose I have a custom object set up in a class similar to this.
Suppose I have a class MyClass to which I want to add certain 'observer'
Suppose I have a Ruby ERB template named my_template.html.erb , and it contains the
suppose I have a html markup like this: <div> <p> this is the parent
Suppose I have a ASP.NET Web API controller that uses a service, which in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.