WPF Border Object Border CornerRadius different from Border Background CornerRadius <p>I have two Borders on top of each other. One with a BorderThickness but no background, the other one without a border thickness, but with a background. Both Borders have a CornerRadius of 3. The problem is that the corner of the Background of one of the Borders sticks out from behind the corner of the other Border.</p> <p><img src="https://i.stack.imgur.com/FJJje.png" alt="Notice the grey protruding out from behind the blue at the corners."></p> <p>Here is the XAML with the first border element having the background and the Border named FocusVisual having the BorderThickness.</p> <pre><code>&lt;Grid x:Name="grid"&gt; &lt;Border Background="{TemplateBinding Background}" CornerRadius="3"&gt; &lt;Grid&gt; &lt;Border x:Name="MouseOverVisual" Opacity="0" Background="{StaticResource NuiFieldHoverBrush}" CornerRadius="3" /&gt; &lt;Border&gt; &lt;Grid&gt; &lt;ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /&gt; &lt;ContentPresenter x:Name="PART_WatermarkHost" Content="{TemplateBinding Watermark}" ContentTemplate="{TemplateBinding WatermarkTemplate}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsHitTestVisible="False" Margin="{TemplateBinding Padding}" Visibility="Collapsed"/&gt; &lt;/Grid&gt; &lt;/Border&gt; &lt;/Grid&gt; &lt;/Border&gt; &lt;Border x:Name="FocusVisual" Opacity="0" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{StaticResource NuiFocusBrush}" CornerRadius="3" /&gt; &lt;/Grid&gt; </code></pre> <p>CornerRadius having a different effect on the Background and Border of a Border object seems like a bug in WPF. </p> <p>I could add a BorderThickness to the Border with the Background and set the BorderBrush to the Background color, but this causes the child elements of that border to be pushed in by the BorderThickness. I can probably get around this by rearranging elements, but it is kind of a pain so I thought I would see if anybody has a better workaround.</p>