title: How do I create a WPF rounded container that clips children?
body: <p>The following piece of code is supposed to draw a menu bar inside a rounded container.  You'll notice that the bottom is rounded, but the corners of the menu aren't.  I followed the directions of chosen answer because it appeared to be the most efficient:</p>
  
  <p><a href="https://stackoverflow.com/questions/120851/how-do-i-create-a-wpf-rounded-corner-container">How do I create a WPF Rounded Corner container?</a></p>
  
  <p>For the record, I am running .NET 4.5 with the latest version of WPF. Here's my code:</p>
  
  <pre><code>&lt;Window
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="240" Height="320" Background="Black" &gt;
        &lt;Border BorderBrush="Red" CornerRadius="10" BorderThickness="1" Background="Gray" &gt;
           &lt;StackPanel&gt;
            &lt;Menu IsMainMenu="True" HorizontalAlignment="Stretch" &gt;
                          &lt;MenuItem Header="_File" /&gt;
                          &lt;MenuItem Header="_Edit" /&gt;
                          &lt;MenuItem Header="_View" /&gt;
                          &lt;MenuItem Header="_Window" /&gt;
                          &lt;MenuItem Header="_Help" /&gt;
                      &lt;/Menu&gt;
  
           &lt;/StackPanel&gt;
        &lt;/Border&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p><strong>EDIT:</strong>
  There's another answer on the same post suggesting a more complex solution suggested by Chris Cavanagh.  His solution isn't as simple or as fast, but it does clip the corners which is what I want.  The question didn't specify clipping and the suggested answer didn't either. Hopefully, the question and or answer will be updated to reflect this.</p>