title: How do I apply an effect to a Border but not to its contents in WPF?
body: <p>I have a WPF application that has a 3rd party data grid with a border around it.  I've used the <code>DropShadowEffect</code> to put a shadow behind the border, but this seems to affect performance somewhat (not nearly as much as a <code>BitmapEffect</code>, but still noticeable) and makes the font rendering fuzzy.  Is there a way to somehow apply the effect to the border, but not its contents?</p>
  
  <p>I tried setting the Effect on the contents to <code>{x:Null}</code>, but that didn't help.</p>
  
  <p>Here is a sample app I came up with.  It puts a shadow behind the border, but it also puts a shadow behind each line of text.  I want the shadow behind the border, but not the text.</p>
  
  <pre><code>&lt;Window x:Class="WpfEffectTest.Window1"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      Title="Window1" Height="300" Width="300"&gt;
      &lt;Grid&gt;
          &lt;Border BorderBrush="Black" BorderThickness="10" CornerRadius="5" Margin="25"&gt;
              &lt;Border.Effect&gt;
                  &lt;DropShadowEffect BlurRadius="10" ShadowDepth="5" /&gt;
              &lt;/Border.Effect&gt;
              &lt;StackPanel&gt;
                  &lt;TextBlock&gt;This is some text&lt;/TextBlock&gt;
                  &lt;TextBlock&gt;This is some text&lt;/TextBlock&gt;
                  &lt;TextBlock&gt;This is some text&lt;/TextBlock&gt;
                  &lt;TextBlock&gt;This is some text&lt;/TextBlock&gt;
                  &lt;TextBlock&gt;This is some text&lt;/TextBlock&gt;
                  &lt;TextBlock&gt;This is some text&lt;/TextBlock&gt;
              &lt;/StackPanel&gt;
          &lt;/Border&gt;
  
      &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>