title: Using a WPF style from another assembly
body: <p>I have been googling for hours trying out different solutions to my problem but have not been able to find one there or on here.</p>
  
  <p>I have a WPF Custom Control Library that also includes a theme .xaml file that has styles I want to apply to controls, however after linking it as a ResourceDictionary I am unable to access the style when modifying the style attribute of a control.</p>
  
  <p>This is how I am linking it</p>
  
  <pre><code>&lt;ResourceDictionary Source="pack://application:,,,/MADEV.WPFNotification;component/Themes/Dark.xaml"/&gt;
  </code></pre>
  
  <p>and this is the .xaml file content:</p>
  
  <pre><code>&lt;ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                  xmlns:local="clr-namespace:MADEV.WPFNotification"&gt;
  
  &lt;SolidColorBrush  x:Key="BG"
                    Color="#FF464646" /&gt;
  &lt;SolidColorBrush x:Key="BG_Darker"
                   Color="#FF3A3A3A" /&gt;
  &lt;SolidColorBrush x:Key="FG"
                   Color="#FFC5C5C5" /&gt;
  
  &lt;Style x:Key="NotificationStyle"
         TargetType="Window"&gt;
      &lt;Setter Property="Height"
              Value="36" /&gt;
      &lt;Setter Property="Width"
              Value="150" /&gt;
      &lt;Setter Property="ResizeMode"
              Value="NoResize" /&gt;
      &lt;Setter Property="ShowInTaskbar"
              Value="False" /&gt;
      &lt;Setter Property="Topmost"
              Value="True" /&gt;
      &lt;Setter Property="Focusable"
              Value="False" /&gt;
      &lt;Setter Property="IsTabStop"
              Value="False" /&gt;
      &lt;Setter Property="WindowStyle"
              Value="None" /&gt;
      &lt;Setter Property="Foreground"
              Value="White" /&gt;
      &lt;Setter Property="Background"
              Value="{StaticResource BG}" /&gt;
      &lt;Setter Property="AllowsTransparency"
              Value="True" /&gt;
      &lt;Setter Property="IsHitTestVisible"
              Value="False" /&gt;
      &lt;Setter Property="ShowActivated"
              Value="False" /&gt;
  &lt;/Style&gt;
  </code></pre>
  
  <p></p>
  
  <p>I would appreciate some help with this</p>
  
  <p>Edit 1: Current App.xaml after vesan's answer, yet still not working:</p>
  
  <pre><code>&lt;Application x:Class="SimpleOSD.App"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
           xmlns:local="clr-namespace:SimpleOSD"
           xmlns:properties="clr-namespace:SimpleOSD.Properties"
           StartupUri="BackgroundProcess.xaml"&gt;
  &lt;Application.Resources&gt;
      &lt;properties:Settings x:Key="Settings" /&gt;
  
      &lt;ResourceDictionary&gt;
          &lt;ResourceDictionary.MergedDictionaries&gt;
              &lt;ResourceDictionary Source="Pack://application:,,,/MADEV.WPFNotification;component/Themes/Dark.xaml" /&gt;
          &lt;/ResourceDictionary.MergedDictionaries&gt;
      &lt;/ResourceDictionary&gt;
  &lt;/Application.Resources&gt;
  </code></pre>
  
  <p></p>