title: Automatic resize of nested UserControl does not work
body: <p>In my application I use a <code>ContentControl</code> and dynamically fill it with a custom <code>UserControl</code>, using binding on <code>Content</code> to bind to a <code>FrameworkElement</code>. [EDITED: added example code to show the problem]</p>
  
  <p>After some input of Steven and Charleh I created a small MVVM project to reproduce the problem. My MainWindow now looks like that:</p>
  
  <pre><code>    &lt;Window x:Class="ResizeExample.MainWindow"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      mc:Ignorable="d"
      xmlns:localVM="clr-namespace:ResizeExample.ViewModels"
      xmlns:local="clr-namespace:ResizeExample"
      Title="ResizeExample"
      WindowStartupLocation="CenterScreen"
      Height="459"
      Width="795"&gt;
  &lt;Window.Resources&gt;
      &lt;localVM:MainWindowViewModel x:Key="Windows1ViewModel" /&gt;
  &lt;/Window.Resources&gt;
  
  &lt;Grid DataContext="{StaticResource Windows1ViewModel}"&gt;
      &lt;Grid.RowDefinitions&gt;
          &lt;RowDefinition Height="50" /&gt;
          &lt;RowDefinition Height="*" /&gt;
      &lt;/Grid.RowDefinitions&gt;
      &lt;Canvas Grid.Row="0"&gt;
          &lt;Menu DockPanel.Dock="Top"/&gt;
          &lt;Label Content="Any Label on the right side" Canvas.Right="0" Canvas.Bottom="0"/&gt;
      &lt;/Canvas&gt;
      &lt;Grid Grid.Row="1" HorizontalAlignment="Stretch"  VerticalAlignment="Stretch"&gt;
          &lt;ContentControl Name="ControlCanvas" Content="{Binding Path=externalView}" HorizontalAlignment="Stretch"  VerticalAlignment="Stretch" HorizontalContentAlignment="Stretch"  VerticalContentAlignment="Stretch"/&gt;
      &lt;/Grid&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p></p>
  
  <p>Setting <code>externalView</code> works fine, but it does not resize when the window is resized. Here how I implemented it in the ViewModel:</p>
  
  <pre><code>    private FrameworkElement _externalView;
      public FrameworkElement externalView
      {
          get { return this._externalView; }
          set
          {
              if (this._externalView != value)
              {
                  this._externalView = value;
                  RaisePropertyChanged(() =&gt; externalView);
              }
          }
      }
  
      public MainWindowViewModel()
      {
          externalView = new UserControl1();
      }
  </code></pre>
  
  <p>The <code>UserControl</code> contains a <code>TabControl</code> (which should resize) and everything else is in the <code>TabControl</code>. The <code>TabControl</code> contains some labels, text boxes and buttons (which should not resize) and a <code>DataGrid</code> (which should resize). At the moment the complete <code>TabControl</code> is minimized, because no size is set and it will not resize.</p>
  
  <pre><code>&lt;UserControl x:Class="ResizeExample.Views.UserControl1"
          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="411" d:DesignWidth="805" HorizontalAlignment="Stretch"  VerticalAlignment="Stretch" &gt;
  &lt;Grid HorizontalAlignment="Stretch"  VerticalAlignment="Stretch"   &gt;
      &lt;TabControl HorizontalAlignment="Left" Name="tabControl1" VerticalAlignment="Top"&gt;
          &lt;TabItem Header="Tab1" Name="Tab1"&gt;
              &lt;Grid /&gt;
          &lt;/TabItem&gt;
          &lt;TabItem Header="Tab2" Name="Tab2"&gt;
              &lt;Grid&gt;
                  &lt;TextBox Height="23" HorizontalAlignment="Left" Margin="6,6,0,0" Name="textBox1" VerticalAlignment="Top" Width="357" /&gt;
                  &lt;Label Content="Input some data 1:" Height="28" HorizontalAlignment="Left" Margin="6,29,0,0" Name="label1" VerticalAlignment="Top" /&gt;
                  &lt;Label Content="Input some data 2:" Height="28" HorizontalAlignment="Left" Margin="6,57,0,0" Name="label2" VerticalAlignment="Top" /&gt;
                  &lt;Label Content="Input some data 3:" Height="28" HorizontalAlignment="Left" Margin="6,85,0,0" Name="label3" VerticalAlignment="Top" /&gt;
                  &lt;DataGrid AutoGenerateColumns="False" MinHeight="200" HorizontalAlignment="Left" Margin="6,113,0,0" Name="releaseNotesGrid" VerticalAlignment="Top" MinWidth="780" /&gt;
              &lt;/Grid&gt;
          &lt;/TabItem&gt;
      &lt;/TabControl&gt;
  &lt;/Grid&gt;
  &lt;/UserControl&gt;
  </code></pre>
  
  <p>I thought the controls would resize automatically, but this is not working. While I'm new to WPF and MVVM, it could be that I missed something basic.</p>
  
  <p>I found <a href="https://stackoverflow.com/questions/2976393/wpf-user-control-does-not-resize-with-main-window">the following thread</a> after which I removed the sizes and added the alignments, but this didn't solve my problem.</p>