title: How to put a border around an ItemsControl?
body: <p>I have an itemscontrol with a custom panel inside a usercontrol. The usercontrols size is only constrained by the parent window size.</p>
  
  <pre><code>&lt;UserControl&gt;
    &lt;Grid&gt;
      &lt;Border BorderBrush="DarkGray" BorderThickness="5"&gt;
        &lt;ItemsControl ItemsSource="{Binding ActiveGame.Grid.CellsFlat}"&gt;
          &lt;ItemsControl.ItemsPanel&gt;
            &lt;ItemsPanelTemplate&gt;
              &lt;Wpf:HexagonalPanel/&gt;
            &lt;/ItemsPanelTemplate&gt;
          &lt;/ItemsControl.ItemsPanel&gt;
          &lt;ItemsControl.ItemTemplate&gt;
            &lt;DataTemplate&gt;
              &lt;Button /&gt;
            &lt;/DataTemplate&gt;
          &lt;/ItemsControl.ItemTemplate&gt;
        &lt;/ItemsControl&gt;
      &lt;/Border&gt;
    &lt;/Grid&gt;
  &lt;/UserControl&gt;
  </code></pre>
  
  <p>I now want the border to be drawn only around the resulting panel.
  But instead its drawn around the whole grid or probably more precisely at the same size as the grid.</p>
  
  <p>I think I implemented the MeasureOverride correctly on my HexagonalPanel, it returns the correct size, so shouldn't it draw the border at that size?</p>
  
  <p>What am I missing?</p>