title: Another Window In The Column Definition
body: <p>I Have 2 Window In My Project. One Of This Is MainWindow.xaml Other One Is Control_Page.xaml.
  I Would Like To Insert Control Page Window To ColumnDefinition And RowDefinition. This Definitions Defined On MainWindow.</p>
  
  <p>Here Is My Code:</p>
  
  <pre><code>&lt;Grid x:Name="Grid_Main" SnapsToDevicePixels="True"&gt;
      &lt;Grid.ColumnDefinitions&gt;
          &lt;ColumnDefinition Width="312*"/&gt;
          &lt;ColumnDefinition Width="353*"/&gt;
          &lt;ColumnDefinition Width="351*"/&gt;
      &lt;/Grid.ColumnDefinitions&gt;
      &lt;Grid.RowDefinitions&gt;
          &lt;RowDefinition Height="187*"/&gt;
          &lt;RowDefinition Height="187*"/&gt;
          &lt;RowDefinition Height="186*"/&gt;
          &lt;RowDefinition Height="178*"/&gt;
      &lt;/Grid.RowDefinitions&gt;
  
      &lt;Grid Grid.Column="0" Grid.Row="0" Margin="0"/&gt;
      &lt;Grid Grid.Column="1" Margin="0"/&gt;
      &lt;Grid Grid.Column="2" Margin="0"/&gt;
      &lt;Grid Margin="0" Grid.Row="1"/&gt;
      &lt;Grid Grid.Column="1" Margin="0" Grid.Row="1"&gt;
          &lt;Button Content="Button" Margin="0" HorizontalAlignment="Center" VerticalAlignment="Center"/&gt;
      &lt;/Grid&gt;
      &lt;Grid Grid.Column="2" Margin="0" Grid.Row="1"&gt;
          &lt;Button x:Name="button1" Content="Button" HorizontalAlignment="Center" Margin="0" VerticalAlignment="Center"/&gt;
      &lt;/Grid&gt;
      &lt;Grid Margin="0" Grid.Row="2"/&gt;
      &lt;Grid Grid.Column="1" Margin="0" Grid.Row="2"/&gt;
      &lt;Grid Grid.Column="2" Margin="0" Grid.Row="2"/&gt;
      &lt;Grid Margin="0" Grid.Row="3"/&gt;
      &lt;Grid Grid.Column="1" Margin="0" Grid.Row="3"/&gt;
      &lt;Grid Grid.Column="2" Margin="0" Grid.Row="3"/&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p>I Was Called The Control_Page To A Var. Then Try As Children To The Main Window But It Does Not Work.</p>
  
  <p>I Tried This Can't Solve This Problem.</p>
  
  <p>Code Behind;</p>
  
  <pre><code>public partial class MainWindow : Window
  {
      public MainWindow()
      {
          InitializeComponent();
  
          var newWindow = new Control_Page();
          Grid.SetRow(newWindow, 0);
          Grid.SetColumn(newWindow, 0);
          Grid_Main.Children.Add(newWindow);
      }
  }
  </code></pre>