title: Wpf Grid with 2 Rows width sizing
body: <p>I am trying to work on this WPF design and not having any luck</p>
  <p>This is the xaml</p>
  <pre><code>&lt;UserControl x:Class=&quot;namespace.myuserControl&quot;
           xmlns=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;
           xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;
           xmlns:mc=&quot;http://schemas.openxmlformats.org/markup-compatibility/2006&quot; 
           xmlns:d=&quot;http://schemas.microsoft.com/expression/blend/2008&quot;
           xmlns:wpf=&quot;clr-namespace:Microsoft.Web.WebView2.Wpf;assembly=Microsoft.Web.WebView2.Wpf&quot;
           mc:Ignorable=&quot;d&quot; 
           Loaded=&quot;UserControl_Loaded&quot;
           Focusable=&quot;True&quot;
           d:DesignHeight=&quot;10000&quot; d:DesignWidth=&quot;1049&quot;&gt;
  
  
  &lt;UserControl.Resources&gt;
      &lt;CollectionViewSource x:Key=&quot;DocumentGroup&quot; Source=&quot;{Binding docs}&quot;&gt;
          &lt;CollectionViewSource.GroupDescriptions&gt;
              &lt;PropertyGroupDescription PropertyName=&quot;type.Name&quot;/&gt;
          &lt;/CollectionViewSource.GroupDescriptions&gt;
      &lt;/CollectionViewSource&gt;
      &lt;DataTemplate x:Key=&quot;groupingHeaderTemplate&quot;&gt;
          &lt;Label VerticalAlignment=&quot;Center&quot; Content=&quot;{Binding}&quot; FontWeight=&quot;Bold&quot; Background=&quot;AliceBlue&quot;&gt;&lt;/Label&gt;
      &lt;/DataTemplate&gt;
  &lt;/UserControl.Resources&gt;
  &lt;Grid HorizontalAlignment=&quot;Left&quot;  VerticalAlignment=&quot;Stretch&quot; Focusable=&quot;True&quot;&gt;
      &lt;Grid.ColumnDefinitions&gt;
          &lt;ColumnDefinition Width=&quot;500&quot; &gt;&lt;/ColumnDefinition&gt;
          &lt;ColumnDefinition Width=&quot;6&quot;&gt;&lt;/ColumnDefinition&gt;
          &lt;ColumnDefinition Width=&quot;*&quot; /&gt;
      &lt;/Grid.ColumnDefinitions&gt;
      &lt;GridSplitter Grid.Column=&quot;1&quot; Grid.RowSpan=&quot;1&quot; HorizontalAlignment=&quot;Center&quot; VerticalAlignment=&quot;Stretch&quot;  
                    BorderBrush=&quot;DarkSlateGray&quot; BorderThickness=&quot;1&quot; Width=&quot;6&quot; ShowsPreview=&quot;True&quot;  &gt;
          &lt;GridSplitter.Background&gt;
              &lt;LinearGradientBrush EndPoint=&quot;1,0.5&quot; StartPoint=&quot;0,0.5&quot;&gt;
                  &lt;GradientStop Color=&quot;#FF808385&quot; Offset=&quot;0&quot;/&gt;
                  &lt;GradientStop Color=&quot;#FFECF1F7&quot; Offset=&quot;1&quot;/&gt;
              &lt;/LinearGradientBrush&gt;
          &lt;/GridSplitter.Background&gt;
      &lt;/GridSplitter&gt;
      &lt;ScrollViewer &gt;
          &lt;ListBox  Grid.Column =&quot;0&quot; ScrollViewer.VerticalScrollBarVisibility=&quot;Visible&quot; Name=&quot;lstCustomList&quot; ItemsSource=&quot;{Binding Source={StaticResource DocumentGroup}}&quot;
  
                    SelectionChanged=&quot;ShowDocument&quot; &gt;
              &lt;ListBox.GroupStyle&gt;
                  &lt;GroupStyle HeaderTemplate= &quot;{StaticResource groupingHeaderTemplate}&quot;  /&gt;
              &lt;/ListBox.GroupStyle&gt;
              &lt;ListBox.ItemTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;TextBlock Text=&quot;{Binding Path=Name}&quot; /&gt;
                  &lt;/DataTemplate&gt;
              &lt;/ListBox.ItemTemplate&gt;
          &lt;/ListBox&gt;
      &lt;/ScrollViewer&gt;
      &lt;Label Name=&quot;clLabel&quot;  Height=&quot;10000&quot; Content=&quot;{Binding docResult, UpdateSourceTrigger=PropertyChanged}&quot; Foreground=&quot;Red&quot;  Padding=&quot;5&quot; Grid.ColumnSpan=&quot;2&quot; Margin=&quot;0,0,7,0&quot;&gt;
          &lt;Label.Style&gt;
              &lt;Style TargetType=&quot;Label&quot;&gt;
                  &lt;Setter Property=&quot;Visibility&quot; Value=&quot;Collapsed&quot;&gt;&lt;/Setter&gt;
                  &lt;Style.Triggers&gt;
                      &lt;DataTrigger Binding=&quot;{Binding docs.Count}&quot; Value=&quot;0&quot;&gt;
                          &lt;Setter Property=&quot;Visibility&quot; Value=&quot;Visible&quot; /&gt;
                      &lt;/DataTrigger&gt;
                  &lt;/Style.Triggers&gt;
              &lt;/Style&gt;
          &lt;/Label.Style&gt;
      &lt;/Label&gt;
      &lt;ScrollViewer Grid.Column=&quot;2&quot; VerticalAlignment=&quot;Stretch&quot; HorizontalAlignment=&quot;Stretch&quot;&gt;
          &lt;Grid HorizontalAlignment=&quot;Left&quot;  VerticalAlignment=&quot;Stretch&quot; Focusable=&quot;True&quot;&gt;
              &lt;Grid.RowDefinitions&gt;
                  &lt;RowDefinition Height=&quot;50&quot; &gt;&lt;/RowDefinition&gt;
                  &lt;RowDefinition Height=&quot;*&quot;&gt;&lt;/RowDefinition&gt;
              &lt;/Grid.RowDefinitions&gt;
              &lt;Button Width=&quot;300&quot; Height=&quot;100&quot;&gt;Launch&lt;/Button&gt;
              &lt;wpf:WebView2 Grid.Row=&quot;1&quot; Name=&quot;View2&quot;  /&gt;
          &lt;/Grid&gt;
      &lt;/ScrollViewer&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/CdPwd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CdPwd.png" alt="enter image description here" /></a></p>