title: Why doesn't the Tab order between/inside a TreeView work?
body: <p>I have a window with following xaml:</p>
  
  <pre><code>&lt;Window x:Class="TestDemoApp.TreeViewWindow"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          Title="TreeViewWindow" Height="300" Width="300"&gt;
      &lt;Window.Resources&gt;
          &lt;Style TargetType="Control" x:Key="FocusedStyle"&gt;
              &lt;Setter Property="Control.Template"&gt;
                  &lt;Setter.Value&gt;
                      &lt;ControlTemplate&gt;
                          &lt;Rectangle StrokeThickness="1"
                                Stroke="Red"
                                StrokeDashArray="1 2 3 4"
                                SnapsToDevicePixels="true"/&gt;
                      &lt;/ControlTemplate&gt;
                  &lt;/Setter.Value&gt;
              &lt;/Setter&gt;
          &lt;/Style&gt;
  
          &lt;Style TargetType="TreeViewItem"&gt;
              &lt;Setter Property="IsTabStop" Value="True"/&gt;
              &lt;Setter Property="Focusable" Value="True"/&gt;
              &lt;Setter Property="FocusVisualStyle" Value="{StaticResource FocusedStyle}"/&gt;
              &lt;Setter Property="KeyboardNavigation.TabNavigation" Value="Continue"/&gt;
          &lt;/Style&gt;
          &lt;Style TargetType="ListViewItem"&gt;
              &lt;Setter Property="IsTabStop" Value="True"/&gt;
              &lt;Setter Property="Focusable" Value="True"/&gt;
              &lt;Setter Property="FocusVisualStyle" Value="{StaticResource FocusedStyle}"/&gt;
              &lt;Setter Property="KeyboardNavigation.TabNavigation" Value="Continue"/&gt;
          &lt;/Style&gt;
      &lt;/Window.Resources&gt;
  
      &lt;Grid&gt;
          &lt;Grid.RowDefinitions&gt;
              &lt;RowDefinition Height="*"/&gt;
              &lt;RowDefinition Height="*"/&gt;
          &lt;/Grid.RowDefinitions&gt;
  
          &lt;ListView TabIndex="1" BorderThickness="5" Focusable="True" IsTabStop="True" KeyboardNavigation.TabNavigation="Continue" FocusVisualStyle="{StaticResource FocusedStyle}"&gt;
              &lt;ListViewItem TabIndex="2" Content="List Item 1"/&gt;
              &lt;ListViewItem TabIndex="3" Content="List Item 2"/&gt;
          &lt;/ListView&gt;
  
          &lt;TreeView TabIndex="6" BorderThickness="5" Focusable="True" IsTabStop="True" KeyboardNavigation.TabNavigation="Continue" Grid.Row="1" FocusVisualStyle="{StaticResource FocusedStyle}"&gt;
              &lt;TreeView.Items&gt;
                  &lt;TreeViewItem TabIndex="7" Header="Tree Item 1"&gt;
                      &lt;TreeViewItem Header="Tree Item 11"&gt;&lt;/TreeViewItem&gt;
                      &lt;TreeViewItem Header="Tree Item 12"/&gt;
                  &lt;/TreeViewItem&gt;
                  &lt;TreeViewItem Header="Tree Item 2"&gt;
                  &lt;/TreeViewItem&gt;
              &lt;/TreeView.Items&gt;
          &lt;/TreeView&gt;
      &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>When I run the program, the tab order is:</p>
  
  <pre>
  1. List View
  2. List Item 1
  3. List Item 2
  4. Tree View
  5. Tree Item 1
  6. Tree Item 2
  
  7. List View (#1)
  8. List Item 1 (#2)
  9. List Item 2 (#3)
  10. Tree Item 2 (6#)
  
  11+ Repeat #7 - #10
  </pre>
  
  <p>The expected behavior is that it would repeats from #1 to #6 upon further iterations, however instead it skips #4 and #5 on any subsequent iterations.</p>
  
  <p>Why is this? And how can I fix it?</p>