title: WPF Drop Shadow Trigger
body: <p>I am creating a button style. Paste this into a window to see the idea:</p>
  
  <p></p>
  
  <pre><code>&lt;Style x:Key="SelectionButton3"
          TargetType="{x:Type Button}"&gt;
  
      &lt;Setter Property="Template"&gt;
          &lt;Setter.Value&gt;
              &lt;ControlTemplate TargetType="{x:Type Button}"&gt;
  
                  &lt;Grid HorizontalAlignment="Stretch"
                          VerticalAlignment="Stretch"
                          ClipToBounds="False"&gt;
  
                      &lt;Grid.RowDefinitions&gt;
                          &lt;RowDefinition Height="75"/&gt;
                      &lt;/Grid.RowDefinitions&gt;
                      &lt;Grid.ColumnDefinitions&gt;
                          &lt;ColumnDefinition Width="100"/&gt;
                          &lt;ColumnDefinition Width="*"/&gt;
                      &lt;/Grid.ColumnDefinitions&gt;
  
                      &lt;Border x:Name="TheBorder" 
                              BorderThickness="0,1.5,1.5,1.5"
                              CornerRadius="3"
                              Background="SteelBlue"
                              Height="35"
                              Grid.Column="1"
                              Grid.Row="0"
                              Margin="-31"
                              BorderBrush="DarkSlateBlue"&gt;
  
                          &lt;Border.BitmapEffect&gt;
                              &lt;DropShadowBitmapEffect x:Name="BorderShadow" 
                                                      ShadowDepth="0"/&gt;
                          &lt;/Border.BitmapEffect&gt;
  
                      &lt;/Border&gt;
  
                      &lt;Rectangle Fill="SteelBlue"
                                  Stroke="DarkSlateBlue"
                                  Grid.Row="0"
                                  Grid.Column="0"&gt;
  
                          &lt;Rectangle.LayoutTransform&gt;
                              &lt;RotateTransform Angle="-45" /&gt;
                          &lt;/Rectangle.LayoutTransform&gt;
  
                          &lt;Rectangle.BitmapEffect&gt;
                              &lt;DropShadowBitmapEffect ShadowDepth="5"/&gt;
                          &lt;/Rectangle.BitmapEffect&gt;
  
                      &lt;/Rectangle&gt;
  
                      &lt;ContentPresenter x:Name="ContentArea"
                                          VerticalAlignment="Center"
                                          HorizontalAlignment="Center"
                                          Content="{Binding Path=Content, RelativeSource={RelativeSource TemplatedParent}}" /&gt;
                  &lt;/Grid&gt;
  
              &lt;/ControlTemplate&gt;
          &lt;/Setter.Value&gt;
  
      &lt;/Setter&gt;
  
      &lt;Setter Property="Foreground"
              Value="LightGray" /&gt;
      &lt;Setter Property="FontFamily"
              Value="Segoe UI" /&gt;
  
  
  
  &lt;/Style&gt;
  </code></pre>
  
  <p></p>
  
  <p></p>
  
  <pre><code>&lt;Button Click="Button_Click"
          Style="{StaticResource SelectionButton3}"
          Width="185"&gt;
  
  &lt;/Button&gt;
  </code></pre>
  
  <p></p>
  
  <p>What I would like to have happen is for the Borders drop shadow to appear when the mouse is over either the Border or the Rectangle. I know I need a trigger, but I'm not really sure where &amp; how to do it.</p>
  
  <p>Can someone point me in the right direction?</p>
  
  <p>Thanks</p>