title: How to use ResourceDictionary as StaticResource in Windows Phone 8 (element not fount)
body: <p>I am creating a Windows Phone 8 app. In the app I have a ResourceDictionary defined in a XAML file as:</p>
  
  <p></p>
  
  <pre><code>     &lt;Style TargetType="TextBlock"&gt;
          &lt;Setter Property="Foreground" Value="YellowGreen" /&gt;
          &lt;Setter Property="FontSize" Value="35" /&gt;
          &lt;Setter Property="TextWrapping" Value="Wrap"/&gt;
      &lt;/Style&gt;
  
      &lt;Style TargetType="TextBox" x:Key="CommonSetters"&gt;
          &lt;Setter Property="Width" Value="450"/&gt;
          &lt;Setter Property="FontSize" Value="35" /&gt;
          &lt;Setter Property="Foreground" Value="YellowGreen" /&gt;
          &lt;Setter Property="Height" Value="100"/&gt;
          &lt;Setter Property="Background" Value="Red"&gt;
              &lt;!--&lt;Setter.Value&gt;
                  &lt;ImageBrush ImageSource="logo.png" Opacity="0.1"/&gt;
              &lt;/Setter.Value&gt;--&gt;
          &lt;/Setter&gt;
      &lt;/Style&gt;
  
  &lt;/ResourceDictionary&gt;
  </code></pre>
  
  <p>This ResourceDictionary is referenced in App.xaml as:</p>
  
  <p>
          xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"></p>
  
  <pre><code>    &lt;!--Application Resources--&gt;
      &lt;Application.Resources&gt;
          &lt;local:LocalizedStrings xmlns:local="clr-namespace:Work_Force" x:Key="LocalizedStrings"/&gt;
          &lt;ResourceDictionary x:Key="myDict"&gt;
              &lt;ResourceDictionary.MergedDictionaries&gt;
                  &lt;ResourceDictionary Source="Resource.xaml"/&gt;
              &lt;/ResourceDictionary.MergedDictionaries&gt;
  
          &lt;/ResourceDictionary&gt;
          &lt;Style TargetType="TextBlock" x:Key="NN"&gt;
              &lt;Setter Property="Width" Value="450"/&gt;
              &lt;Setter Property="FontSize" Value="35" /&gt;
              &lt;Setter Property="Foreground" Value="YellowGreen" /&gt;
              &lt;Setter Property="Height" Value="100"/&gt;
          &lt;/Style&gt;
      &lt;/Application.Resources&gt;
  
      &lt;Application.ApplicationLifetimeObjects&gt;
          &lt;!--Required object that handles lifetime events for the application--&gt;
          &lt;shell:PhoneApplicationService
              Launching="Application_Launching" Closing="Application_Closing"
              Activated="Application_Activated" Deactivated="Application_Deactivated"/&gt;
      &lt;/Application.ApplicationLifetimeObjects&gt;
  
  &lt;/Application&gt;
  </code></pre>
  
  <p>And then the easy part of doing:</p>
  
  <p>
       </p>
  
  <p>Static Resources NN work fine but commonSetters is not working it declared in resourse.xaml.</p>