title: How to use SharedSizeScope between 2 wpf controls with parent child relation?
body: <p>I have a scenario where i have one control, which is using another control thru ListBox.ItemTemplate. I need to share Height and width between these 2 controls. How can we achieve that?</p>
  
  <p>Main Conrol Xaml looks like as followings:</p>
  
  <pre><code> &lt;Grid&gt;
      &lt;Grid.RowDefinitions&gt;
          &lt;RowDefinition Height="Auto" /&gt;
      &lt;/Grid.RowDefinitions&gt;
      &lt;Grid.ColumnDefinitions&gt;
          &lt;ColumnDefinition Width="Auto" /&gt;
          &lt;ColumnDefinition /&gt;
      &lt;/Grid.ColumnDefinitions&gt;
  
      &lt;Grid &gt;
          &lt;Grid.RowDefinitions&gt;
              &lt;RowDefinition Height="Auto" /&gt;
              &lt;RowDefinition /&gt;
          &lt;/Grid.RowDefinitions&gt;
          &lt;TextBlock Grid.Row="0"
                     Text="{Binding Path=Caption,
                                    Mode=OneWay}" /&gt;
          &lt;TextBlock Grid.Row="1"
                     Text="{Binding Path=Caption2,
                                    Mode=OneWay}" /&gt;
      &lt;/Grid&gt;
  
      &lt;ListBox Grid.Row="0"
               Grid.Column="1"
               ItemsSource="{Binding Path=ViewModels}"&gt;
          &lt;ListBox.ItemTemplate&gt;
              &lt;DataTemplate&gt;
                  &lt;Views:View2 /&gt;
              &lt;/DataTemplate&gt;
  
    &lt;/ListBox.ItemTemplate&gt;
    &lt;ListBox.ItemsPanel&gt;
      &lt;ItemsPanelTemplate&gt;
        &lt;StackPanel Orientation="Horizontal"&gt;&lt;/StackPanel&gt;
      &lt;/ItemsPanelTemplate&gt;
    &lt;/ListBox.ItemsPanel&gt;
  &lt;/ListBox&gt;
  </code></pre>
  
  <p>View2 xaml looks like as following:</p>
  
  <pre><code>&lt;Grid&gt;
      &lt;Grid.RowDefinitions&gt;
          &lt;RowDefinition Height="Auto" /&gt;
          &lt;RowDefinition Height="Auto" /&gt;
          &lt;RowDefinition /&gt;
      &lt;/Grid.RowDefinitions&gt;
      &lt;Grid.ColumnDefinitions&gt;
          &lt;ColumnDefinition /&gt;
      &lt;/Grid.ColumnDefinitions&gt;
  
      &lt;TextBlock Grid.Row="0"
                 Grid.Column="0"
                 Text="{Binding Path=Value,
                                Mode=OneWay}"/&gt;
  
  
      &lt;TextBlock  Text="{Binding Path=Value2,
                                Mode=OneWay}"
                                  Grid.Row="1"
                                  Grid.Column="0"
                                 /&gt;
  &lt;/Grid&gt;
  </code></pre>