title: Binding with multiple view models
body: <p>I have a viewmodel for a usercontrol that is defined in a data template for the viewmodel. I would like to bind the 'GridViewData' property of the usercontrol to the 'Data' property of the viewmodel.</p>
  
  <p>I am still new to WPF and terrible at bindings, so please be kind :p</p>
  
  <p>XAML:</p>
  
  <pre><code>&lt;Window x:Class="ReportUtility.MainWindow"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:lite="clr-namespace:ReportUtility.Controls.LiteGrid"
      xmlns:vm="clr-namespace:ReportUtility.ViewModels"
      xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
      Title="MainWindow" Height="350" Width="525"&gt;
  
  &lt;!--This is the view model I want to bind to variable name is Grid: hosted in the content control below--&gt;
  &lt;Window.Resources&gt;
      &lt;DataTemplate DataType="{x:Type vm:LiteGridViewModel}"&gt;
          &lt;lite:LiteGrid GridViewData="{Binding ??}"/&gt;
      &lt;/DataTemplate&gt;
  &lt;/Window.Resources&gt;
  
  &lt;Grid&gt;
      &lt;Grid.RowDefinitions&gt;
          &lt;RowDefinition Height="auto"/&gt;
          &lt;RowDefinition Height="50"/&gt;
          &lt;RowDefinition Height="*"/&gt;
      &lt;/Grid.RowDefinitions&gt;
      &lt;Grid.ColumnDefinitions&gt;
          &lt;ColumnDefinition/&gt;
          &lt;ColumnDefinition Width="150"/&gt;
      &lt;/Grid.ColumnDefinitions&gt;
  
      &lt;Button Grid.Row="0" Content="TestButton" HorizontalAlignment="Stretch" Command="{Binding ExecuteQueryCommand}"/&gt;
      &lt;TextBox Grid.Row="1" Text="{Binding Path=SqlCommandText, UpdateSourceTrigger=PropertyChanged}"/&gt;
      &lt;ContentControl Content="{Binding Grid}" Grid.Row="2" Background="Red"/&gt;
  
      &lt;Border Background="Aqua" Grid.Column="1" Grid.RowSpan="3"/&gt;
      &lt;GridSplitter Grid.Column="0" Width="3" Grid.RowSpan="3"/&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p></p>