title: MahApps Metro setting Window Border styles from App Resources
body: <p>I am trying to set Window Border styles for my MahApps Metro app. I have read the articles about how to set the different Border styles and I think I get it. However, I am trying to set the Border Style for all windows in my app to be the same (all Drop Shadow) and it doesn't seem to want to work.</p>
  
  <p>I have app resources that look like this:</p>
  
  <pre><code>&lt;Application.Resources&gt;
      &lt;ResourceDictionary&gt;
          &lt;ResourceDictionary.MergedDictionaries&gt;
              &lt;ResourceDictionary Source="pack://application:,,,/GSDXThemes;component/GSDXDarkYellowTheme.xaml" /&gt;
          &lt;/ResourceDictionary.MergedDictionaries&gt;
      &lt;/ResourceDictionary&gt;
  &lt;/Application.Resources&gt;
  </code></pre>
  
  <p>My Resource dictionary looks like this:</p>
  
  <pre><code>&lt;!-- Merge in ResourceDictionaries defining base styles to use. This theme is based on the Metro Dark Yellow theme. --&gt;
  &lt;ResourceDictionary.MergedDictionaries&gt;
      &lt;ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" /&gt;
      &lt;ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" /&gt;
      &lt;ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" /&gt;
      &lt;ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Yellow.xaml" /&gt;
      &lt;ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseDark.xaml" /&gt;
      &lt;ResourceDictionary Source="pack://application:,,,/GSDXThemes;component/GSDXControlStyles.xaml" /&gt;
  &lt;/ResourceDictionary.MergedDictionaries&gt;
  </code></pre>
  
  <p>The GSDXControlStyles dictionary just sets some custom style values for my app. It is in this file that I try to set the Window Borders.</p>
  
  <pre><code>&lt;ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:resx="clr-namespace:GSDXThemes.Properties"
                  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                  xmlns:System="clr-namespace:System;assembly=mscorlib"
                  xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
                  xmlns:GSDUserControls="clr-namespace:GSD.CommonGUI.UserControls;assembly=CommonGUI"&gt;
  
  &lt;ResourceDictionary.MergedDictionaries&gt;
      &lt;ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" /&gt;
  &lt;/ResourceDictionary.MergedDictionaries&gt;
  
  &lt;!-- Now customize the theme for our use...mostly just changing font sizes, etc...--&gt;
  &lt;Style TargetType="{x:Type Controls:MetroWindow}" &gt;
      &lt;Setter Property="WindowTransitionsEnabled" Value="False" /&gt;
      &lt;Setter Property="EnableDWMDropShadow" Value="True" /&gt;
  &lt;/Style&gt;
  
  &lt;Style TargetType="{x:Type Label}" BasedOn="{StaticResource MetroLabel}"&gt;
      &lt;Setter Property="FontSize" Value="16"/&gt;
  &lt;/Style&gt;
  
  &lt;Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource MetroTextBox}"&gt;
      &lt;Setter Property="FontSize" Value="16"/&gt;
  &lt;/Style&gt;
  ...
  </code></pre>
  
  <p>All the other style settings work fine. But the first line for setting the Window Border does nothing. All my windows show with no border.</p>
  
  <p>How can I get this to work so all Windows have the Drop Shadow border?</p>