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

  • Home
  • SEARCH
  • 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 1058865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T18:05:13+00:00 2026-05-16T18:05:13+00:00

I’m having an issue with tabbing through the controls on a WPF application using

  • 0

I’m having an issue with tabbing through the controls on a WPF application using the MVVM pattern. I have the following XAML which defines a tree structure

<Grid Background="Transparent" Margin="10">
    <TreeView ItemsSource="{Binding FirstLevelNavigableViewModels}" Background="Transparent" 
              HorizontalContentAlignment="Stretch"
              HorizontalAlignment="Stretch"
              BorderThickness="0"
              ItemContainerStyle="{StaticResource TreeViewItemStyle1}">
        <TreeView.Resources>
            <HierarchicalDataTemplate DataType="{x:Type ViewModel:VendorViewModel}" ItemsSource="{Binding Children}">
                <View:VendorView HorizontalContentAlignment="Stretch" />
            </HierarchicalDataTemplate>

            <DataTemplate DataType="{x:Type ViewModel:ProductViewModel}">
                <View:ProductView HorizontalContentAlignment="Stretch" />
            </DataTemplate>
        </TreeView.Resources>
    </TreeView>
</Grid>

When the treeview is loaded, the XAML for the “ProductView” is as follows

<Border Margin="0,2,2,2" CornerRadius="3" Background="#3FC7B299" DockPanel.Dock="Right" HorizontalAlignment="Right" Width="109">
    <StackPanel Orientation="Vertical" Margin="6,4">
        <DockPanel>
            <TextBlock  DockPanel.Dock="Left" FontFamily="Segoe" FontSize="10" FontWeight="Medium"
                        Foreground="Black" Opacity="0.75" 
                        Text="CALC. REG. PRICE"></TextBlock>
            <Button Width="10" Height="10" Background="Transparent" BorderBrush="Transparent" BorderThickness="0" Padding="-4" Margin="0" Command="{Binding UserDefinedRetailPriceCommand}" Visibility="{Binding UserDefinedRetailPriceButtonView}">
                <Image Width="10" Height="10" Source="/Arhaus.Pricing.Client;component/Styles/Images/error.png"></Image>
            </Button>
        </DockPanel>
        <TextBox    FontFamily="Segoe" FontSize="16" FontWeight="Medium" KeyboardNavigation.IsTabStop="True" KeyboardNavigation.TabIndex="{Binding RegularPriceTabIndex}"
                    Foreground="Black" Opacity="0.9" KeyboardNavigation.TabNavigation="Continue"
                    ebf:LostFocusBehaviour.LostFocusCommand = "{Binding LostFocusSugg}"
                    Text="{Binding NewSuggestedRetailPrice,Converter={StaticResource FormattingConverter}, ConverterParameter=' \{0:C\}', Mode=TwoWay, UpdateSourceTrigger=LostFocus}" Background="#FFE6DED3" BorderBrush="#FFE6DED3" DataContext="{Binding StringFormat=\{0:c\}, NotifyOnValidationError=True}" Padding="0" TabIndex="1"></TextBox>
    </StackPanel>
</Border>

I have the Tab Index bound to an integer that is ever increasing and bound as the treeview is loaded (I.E. I have it setup as tab index 1, 2, 3 etc. as each successive model is loaded).

I would like to be able to hit tab and jump to the next textbox in the treeview but when I click the TAB key, nothing happens. I’m not sure if I have the tabbing setup correctly but I’m very new to WPF and at a loss as to where and how to set the tabbing to make it work. I’m used to WinForms where you just set the tab index and go from there.

Thank you for your assistance, I apologize for the large code block.

  • 1 1 Answer
  • 1 View
  • 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-05-16T18:05:13+00:00Added an answer on May 16, 2026 at 6:05 pm

    I don’t have a solution ready but some thoughts that maybe may help:

    I don’t know what RegularPriceTabIndex returns but probably it begins for each new TreeViewItem at the same index?
    The same tab-index is given then multiple times because of repeating use of ProductView. Perhaps this leads to a problem. You can try setting FocusManager.IsFocusScope=”true” for the ProductView. Maybe this helps.

    Try also to set Control.IsTabStop=”true” on the TextBox.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
We're building an app, our first using Rails 3, and we're having to build
I have a text area in my form which accepts all possible characters from
I have thousands of HTML files to process using Groovy/Java and I need to
I am trying to loop through a bunch of documents I have to put
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

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.