title: wpf Textbox doesn't fill in datatemplate
body: <p>Hi i have a recursive datatemplate with an image and a textbox, however the textbox doesn't fill the entire width, which it did before i made it to a datatemplate. I've tried putting it into a dockpanel, width fillLastChild set to true, however that made no difference.</p>
  
  <pre><code>        &lt;DataTemplate x:Key="GroupQuestionTemplate"&gt;
          &lt;Border BorderBrush="DarkSlateBlue" Margin="5"&gt;
              &lt;Border.Style&gt;
                  &lt;Style TargetType="Border"&gt;
                      &lt;Style.Triggers&gt;
                          &lt;DataTrigger Binding="{Binding IsChild}" Value="True"&gt;
                              &lt;Setter Property="Margin" Value="15,0,0,0"/&gt;
                          &lt;/DataTrigger&gt;
                      &lt;/Style.Triggers&gt;
                  &lt;/Style&gt;
              &lt;/Border.Style&gt;
              &lt;DockPanel Margin="10"&gt;
                  &lt;Button Content="Log" DockPanel.Dock="Top" HorizontalAlignment="Right"  Width="26" Height="21" Margin="-5,-5,-5,-5" Click="Button_Click"/&gt;
                  &lt;DockPanel DockPanel.Dock="Left" HorizontalAlignment="Left"&gt;
                      &lt;Image Name="CheckBox" Width="32" MouseDown="CheckBox_MouseDown" Margin="5,0,0,0"&gt;
                          &lt;Image.Style&gt;
                              &lt;Style TargetType="{x:Type Image}"&gt;
                                  &lt;Setter Property="Source" Value="/Icons/checkbox48x48.png"/&gt;
                                  &lt;Style.Triggers&gt;
                                      &lt;DataTrigger Binding="{Binding Path=Answer.State}" Value="Done"&gt;
                                          &lt;Setter Property="Source" Value="/Icons/check48x48.png"/&gt;
                                      &lt;/DataTrigger&gt;
                                      &lt;DataTrigger Binding="{Binding Path=Answer.State}" Value="NotDone"&gt;
                                          &lt;Setter Property="Source" Value="/Icons/delete48x48.png"/&gt;
                                      &lt;/DataTrigger&gt;
                                      &lt;DataTrigger Binding="{Binding Path=Answer.State}" Value="NotApplicable"&gt;
                                          &lt;Setter Property="Source" Value="/Icons/checkbox48x48.png"/&gt;
                                      &lt;/DataTrigger&gt;
                                      &lt;DataTrigger Binding="{Binding Path=Answer.State}" Value="NotAnswered"&gt;
                                          &lt;Setter Property="Source" Value="/Icons/checkbox48x48.png"/&gt;
                                      &lt;/DataTrigger&gt;
                                  &lt;/Style.Triggers&gt;
                              &lt;/Style&gt;
                          &lt;/Image.Style&gt;
                      &lt;/Image&gt;
                  &lt;/DockPanel&gt;
                  &lt;StackPanel&gt;
                      &lt;TextBlock Text="{Binding Header}" Margin="10,0,0,0" TextWrapping="Wrap"/&gt;
                      &lt;TextBox Text="{Binding Answer.Comment, UpdateSourceTrigger=PropertyChanged}" Margin="10,0,0,0" TextWrapping="Wrap" AcceptsReturn="True" Height="50"&gt;
                          &lt;TextBox.Style&gt;
                              &lt;Style TargetType="TextBox"&gt;
                                  &lt;Setter Property="IsEnabled" Value="False"/&gt;
                                  &lt;Style.Triggers&gt;
                                      &lt;DataTrigger Binding="{Binding Answer.State}" Value="NotAnswered"&gt;
                                          &lt;Setter Property="IsEnabled" Value="True"/&gt;
                                      &lt;/DataTrigger&gt;
                                      &lt;DataTrigger Binding="{Binding Answer.State}" Value="NotApplicable"&gt;
                                          &lt;Setter Property="IsEnabled" Value="True"/&gt;
                                      &lt;/DataTrigger&gt;
                                  &lt;/Style.Triggers&gt;
                              &lt;/Style&gt;
                          &lt;/TextBox.Style&gt;
  
                      &lt;/TextBox&gt;
                  &lt;/StackPanel&gt;
                  &lt;ItemsControl ItemsSource="{Binding Children}" ItemTemplate="{DynamicResource ResourceKey=GroupQuestionTemplate}"&gt;
                      &lt;ItemsControl.ItemsPanel&gt;
                          &lt;ItemsPanelTemplate&gt;
                              &lt;StackPanel Orientation="Vertical" /&gt;
                          &lt;/ItemsPanelTemplate&gt;
                      &lt;/ItemsControl.ItemsPanel&gt;
                  &lt;/ItemsControl&gt;
              &lt;/DockPanel&gt;
          &lt;/Border&gt;
      &lt;/DataTemplate&gt;
  &lt;/Window.Resources&gt;
  </code></pre>
  
  <p>and this is where i use it</p>
  
  <pre><code>        &lt;TabControl Grid.Row="1" ItemsSource="{Binding Groups}" TabStripPlacement="Left"&gt;
          &lt;TabControl.ItemTemplate&gt;
              &lt;DataTemplate&gt;
                  &lt;TextBlock Text="{Binding Header}"/&gt;
              &lt;/DataTemplate&gt;
          &lt;/TabControl.ItemTemplate&gt;
  
          &lt;TabControl.ContentTemplate&gt;
              &lt;DataTemplate&gt;
                  &lt;ItemsControl ItemsSource="{Binding Questions}" ItemTemplate="{StaticResource ResourceKey=GroupQuestionTemplate}"&gt;
  
                      &lt;ItemsControl.ItemsPanel&gt;
                          &lt;ItemsPanelTemplate&gt;
                              &lt;StackPanel Orientation="Vertical" /&gt;
                          &lt;/ItemsPanelTemplate&gt;
                      &lt;/ItemsControl.ItemsPanel&gt;
                  &lt;/ItemsControl&gt;
  
              &lt;/DataTemplate&gt;
  
          &lt;/TabControl.ContentTemplate&gt;
      &lt;/TabControl&gt;
  </code></pre>