title: How to make an element look like it's "below" the border, but "above" the border's content, when the border has rounded corners?
body: <h2>TL/DR:</h2>
  <p>How to make an element look like it's &quot;below&quot; the border, but &quot;above&quot; the border's content, when the border has rounded corners?</p>
  <h2>Elaboration:</h2>
  <p>This is what I'm trying to accomplish: when the mouse moves into the border, a &quot;curtain&quot; is drawn from the top-left corner until it covers either the whole border's content or maybe just 3/4 of it, like this example:</p>
  <p><img src="https://i.stack.imgur.com/WlAxx.png" alt="enter image description here" /></p>
  <p>This &quot;curtain&quot; is intended to carry additional controls to update its box content.</p>
  <p>I'm stuck right now creating the red path - I can't make it perfectly aligned along the black border, so it'll look like it comes from below the border, but above its content.</p>
  <p>Here is the <code>XAML</code> I currently have:</p>
  <pre><code>&lt;UserControl x:Class=&quot;FamilyTree.GroupBox&quot;
               xmlns=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;
               xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;
               xmlns:mc=&quot;http://schemas.openxmlformats.org/markup-compatibility/2006&quot; 
               xmlns:d=&quot;http://schemas.microsoft.com/expression/blend/2008&quot; 
               mc:Ignorable=&quot;d&quot; 
               d:DesignHeight=&quot;100&quot; d:DesignWidth=&quot;100&quot;&gt;
      &lt;Grid&gt;
          &lt;StackPanel Orientation=&quot;Horizontal&quot; VerticalAlignment=&quot;Center&quot;&gt;
              &lt;StackPanel.Resources&gt;
                  &lt;Style TargetType=&quot;{x:Type TextBlock}&quot;&gt;
                      &lt;Style.Setters&gt;
                          &lt;Setter Property=&quot;VerticalAlignment&quot; Value=&quot;Center&quot; /&gt;
                      &lt;/Style.Setters&gt;
                  &lt;/Style&gt;
              &lt;/StackPanel.Resources&gt;
  
              &lt;Border CornerRadius=&quot;5&quot; BorderBrush=&quot;Black&quot; BorderThickness=&quot;1&quot; VerticalAlignment=&quot;Center&quot; ToolTip=&quot;{Binding ToolTipString}&quot; Background=&quot;White&quot;&gt;
                  &lt;Grid&gt;
                      &lt;StackPanel Margin=&quot;3&quot;&gt;
                          &lt;StackPanel.Resources&gt;
                              &lt;Style TargetType=&quot;{x:Type Border}&quot;&gt;
                                  &lt;Setter Property=&quot;CornerRadius&quot; Value=&quot;3&quot; /&gt;
                                  &lt;Setter Property=&quot;BorderBrush&quot; Value=&quot;Blue&quot; /&gt;
                                  &lt;Setter Property=&quot;BorderThickness&quot; Value=&quot;0.6&quot; /&gt;
                                  &lt;Setter Property=&quot;VerticalAlignment&quot; Value=&quot;Center&quot; /&gt;
                                  &lt;Setter Property=&quot;Padding&quot;&gt;
                                      &lt;Setter.Value&gt;
                                          &lt;Thickness Right=&quot;2&quot; /&gt;
                                      &lt;/Setter.Value&gt;
                                  &lt;/Setter&gt;
                                  &lt;Setter Property=&quot;Margin&quot; Value=&quot;0&quot; /&gt;
                              &lt;/Style&gt;
                          &lt;/StackPanel.Resources&gt;
                          &lt;StackPanel Orientation=&quot;Horizontal&quot;&gt;
                              &lt;Border&gt;
                                  &lt;TextBlock Text=&quot;Name&quot; /&gt;
                              &lt;/Border&gt;
                              &lt;TextBlock Text=&quot;/&quot;/&gt;
                              &lt;Border&gt;
                                  &lt;TextBlock Text=&quot;Family&quot; /&gt;
                              &lt;/Border&gt;
                          &lt;/StackPanel&gt;
                          &lt;TextBlock Text=&quot;Group&quot;/&gt;
                      &lt;/StackPanel&gt;
                      &lt;Path Stroke=&quot;Red&quot; Fill=&quot;Red&quot; Data=&quot;M50,0 L5,0 C1.5,0 0,1.5 0,5 L0,50&quot; StrokeLineJoin=&quot;Round&quot; Margin=&quot;0.5&quot;/&gt;
                  &lt;/Grid&gt;
              &lt;/Border&gt;
          &lt;/StackPanel&gt;
      &lt;/Grid&gt;
  &lt;/UserControl&gt;
  </code></pre>