title: Setting tab order in wpf when use from UserControls?
body: <p>I have a User Control like this:</p>
  
  <pre><code>&lt;UserControl x:Class="MySample.customtextbox"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
           mc:Ignorable="d" 
           d:DesignHeight="20" d:DesignWidth="300"&gt;
  &lt;Grid&gt;
      &lt;TextBox x:Name="Ytextbox"  Background="Yellow"/&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p></p>
  
  <p>And I use this control in a window and set tab orders...but when my window is loaded, the tab order is not working correctly!!!
  my window code:</p>
  
  <pre><code>&lt;Window xmlns:my="clr-namespace:MySample"  x:Class="MySample.window"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      Title="window" Height="300" Width="600"&gt;
  &lt;Grid&gt;
      &lt;Grid.RowDefinitions&gt;
          &lt;RowDefinition&gt;&lt;/RowDefinition&gt;
          &lt;RowDefinition&gt;&lt;/RowDefinition&gt;
  
      &lt;/Grid.RowDefinitions&gt;
      &lt;Grid.ColumnDefinitions&gt;
          &lt;ColumnDefinition&gt;&lt;/ColumnDefinition&gt;
          &lt;ColumnDefinition&gt;&lt;/ColumnDefinition&gt;
          &lt;ColumnDefinition&gt;&lt;/ColumnDefinition&gt;
          &lt;ColumnDefinition&gt;&lt;/ColumnDefinition&gt;
      &lt;/Grid.ColumnDefinitions&gt;
  
     &lt;my:customtextbox Grid.Column="1" KeyboardNavigation.TabIndex="0" InfoText="{Binding msg}" Height="20"/&gt;
      &lt;TextBox Grid.Column="3" KeyboardNavigation.TabIndex="1" Text="{Binding msg}" Height="20" Background="Gold"&gt;&lt;/TextBox&gt;
      &lt;my:customtextbox Grid.Row="1" Grid.Column="1" KeyboardNavigation.TabIndex="2" InfoText="{Binding msg}" Height="20"/&gt;
      &lt;TextBox Grid.Column="3"  Grid.Row="1"  Text="{Binding msg}" Height="20" KeyboardNavigation.TabIndex="3" Background="Gold"&gt;&lt;/TextBox&gt;
  
  &lt;/Grid&gt;
  </code></pre>
  
  <p></p>