title: Why is this WPF border is showing around the column and not the StackPanel?
body: <p>I'm trying to place a Border around a StackPanel like so:</p>
  
  <pre><code>&lt;Border CornerRadius="5" BorderBrush="#009999" Background="Transparent" 
          BorderThickness="2" Grid.Column="2" Grid.Row="0"&gt;
        &lt;StackPanel HorizontalAlignment="Center" Margin="0,30,0,0"&gt;
             &lt;!--Contents--&gt;
        &lt;/StackPanel&gt;
  &lt;/Border&gt;
  </code></pre>
  
  <p>For some reason, the border is appearing around the column that the StackPanel is in, not the StackPanel itself. I can change the margin of the border, but that doesn't hold up if the screen is resized. I also tried getting rid of the StackPanel margin but that made no difference. The StackPanel is the only object in this column.</p>