Here is what worked for me. I found that rounded corners added some additional problems when creating the shadow of the upper area correctly, but I was able to get this working by combining several methods.
the first technique involves the smart use of two boundaries. The outer border is ClipToBounds true, and the inner border is DropShadowEffect , with ShadowDepth set to 0 and a BlurRadius around 5. This gives us some of what we need, but it won’t handle the rounded corner problem (we get to that) . This method can be found in this article . Here is its essence:
<Border BorderBrush="DarkGray" BorderThickness="1" ClipToBounds="True"> <Border BorderBrush="Black" BorderThickness="1" Margin="-1"> <Border.Effect> <DropShadowEffect ShadowDepth="0" BlurRadius="6"> </Border.Effect> </Border> </Border>
If I recall correctly, at the moment we will have something close to what you want, except that DropShadowEffect "bleeds" from rounded corners (we will talk about this again).
Another problem we now have is that any children that we place inside the internal Border also applied DropShadowEffect to them! To fix this problem, we need a second method . Place the two Borders together with another container (to save the contents) in the Grid , so that the external Border and the new container will be siblings. This will cause siblings to overlap with each other only by applying DropShadowEffect to Border . See this answer .
Now, to address the bleed problem, where DropShadowEffect does not follow the outline of rounded corners, but rather acts as if the corners were right. This requires a third method . We need to use the Michah ClippingBorder user control. We need to replace the aforementioned external Border element with its ClippingBorder , while maintaining the ClipToBounds true. This will reduce bleeding in rounded corners.
I was able to combine these three methods to create the look of the “immersed in” (or “insert”) border. It looked something like this:
<Grid> <local:ClippingBorder x:Name="TopShadowClippingBorder" BorderThickness="0" CornerRadius="5" ClipToBounds="True"> <Border x:Name="TopShadowBorder" BorderBrush="#D8333333" BorderThickness=".5,1,.5,0" Padding="0" CornerRadius="5" ClipToBounds="True"> <Border.Effect> <DropShadowEffect Direction="270" ShadowDepth="0.5"/> </Border.Effect> </Border> </local:ClippingBorder> <Border x:Name="InsetBorder" BorderBrush="#99A1A1A1" BorderThickness="0.5,0,0.5,1" CornerRadius="5" /> <StackPanel x:Name="Contents_StackPanel" Orientation="Horizontal" Margin="5,5,5,5"> (Contents go here...) </StackPanel> </Grid>

Note that the top “glow” (DropShadowEffect) perfectly follows the outline of the rounded corner of the border:
