title: Trouble with GroupBox and ListBox
body: <p>I am having trouble with properly aligning the contents of my listbox. I have the following XAML. Basically, I am trying to show a number of ListBoxes, each under their own header. I am also attaching a screenshot. As you can see, only the ListBox with the longest TextBlock will have its X buttons right aligned properly. I have tried HorizontalContentAlignment="Stretch", but that didn't work. I have also double checked that the ListBox, ListBoxItem, and GroupBox styles that I am including don't do anything weird. I've basically removed all styling and the problem persists. Any ideas? I am open to any ideas, including changing my XAML around.</p>
  
  <pre><code>&lt;ItemsControl Grid.Row="0" ItemsSource="{Binding Path=Items}"&gt;
  &lt;ItemsControl.ItemTemplate&gt;
      &lt;DataTemplate&gt;
          &lt;GroupBox Header="{Binding Path=CategoryName}"&gt;
              &lt;ListBox Grid.IsSharedSizeScope="True" ItemsSource="{Binding Path=Items}"&gt;
                  &lt;ItemsControl.ItemTemplate&gt;
                      &lt;DataTemplate&gt;
                          &lt;Grid&gt;
                              &lt;Grid.ColumnDefinitions&gt;
                                  &lt;ColumnDefinition Width="15" SharedSizeGroup="Col1"/&gt;
                                  &lt;ColumnDefinition Width="Auto" SharedSizeGroup="Col2"/&gt;
                                  &lt;ColumnDefinition Width="Auto" SharedSizeGroup="Col3"/&gt;
                                  &lt;ColumnDefinition Width="11" SharedSizeGroup="Col4"/&gt;
                              &lt;/Grid.ColumnDefinitions&gt;
  
                              &lt;Path Grid.Column="0" Visibility="{Binding Path=IsChecked, Mode=OneWay, Converter={StaticResource BooleanToVisibilityConverter}}" Stroke="{StaticResource Green06Brush}" StrokeThickness="2" SnapsToDevicePixels="False" Data="M 1 6 L 4 9 L 10 1" Margin="0.6,0.6,0.6,0.6" ClipToBounds="true" StrokeEndLineCap="Flat" StrokeStartLineCap="Flat"/&gt;
  
                              &lt;TextBlock Grid.Column="1" Text="{Binding Path=Symbol}" HorizontalAlignment="Left" Margin="2,0,10,0"/&gt;
                              &lt;TextBlock Grid.Column="2" Text="{Binding Path=Name}" HorizontalAlignment="Left" Margin="0,0,10,0"/&gt;
  
                              &lt;fpp:ImageButton Grid.Column="3" RenderOptions.BitmapScalingMode="NearestNeighbor" Source="Images/Clear_X.png" MouseOverSource="Images/Clear_X_On.png" DisabledSource="Images/Clear_X_Disabled.png" HorizontalAlignment="Right" VerticalAlignment="Center" Click="ClickRemoveTicker"/&gt;
                          &lt;/Grid&gt;
                      &lt;/DataTemplate&gt;
                  &lt;/ItemsControl.ItemTemplate&gt;
              &lt;/ListBox&gt;
          &lt;/GroupBox&gt;
      &lt;/DataTemplate&gt;
  &lt;/ItemsControl.ItemTemplate&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>Original ScreenShot</strong></p>
  
  <p><img src="https://i.stack.imgur.com/wOwfC.png" alt="Original Screenshot"> </p>
  
  <p><strong>Updated ScreenShot</strong></p>
  
  <p><img src="https://i.stack.imgur.com/91WlS.png" alt="enter image description here"></p>