title: WPF Custom-Control Style Not Implemented
body: <p>I hope someone can help me please.</p>
  <p>I am taking my first tentative steps into WPF by first making a simple custom control. The structure is indicated below.</p>
  <p><a href="https://i.stack.imgur.com/LiAxB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LiAxB.png" alt="enter image description here" /></a></p>
  <p>And the respective code is
  MainWindow.xaml</p>
  <pre><code>&lt;Window x:Class=&quot;WPFCustomControl.MainWindow&quot;
      xmlns=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;
      xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;
      xmlns:d=&quot;http://schemas.microsoft.com/expression/blend/2008&quot;
      xmlns:mc=&quot;http://schemas.openxmlformats.org/markup-compatibility/2006&quot;
      xmlns:local=&quot;clr-namespace:WPFCustomControl.NewFolder1&quot;
      mc:Ignorable=&quot;d&quot;
      Title=&quot;MainWindow&quot; Height=&quot;450&quot; Width=&quot;800&quot;&gt;
  
  &lt;StackPanel Grid.Row=&quot;1&quot;&gt;
      &lt;local:MyCustomControl x:Name = &quot;customControl&quot;                                  
       Content = &quot;Click Me&quot; Width = &quot;70&quot; 
       Margin = &quot;10&quot; Click = &quot;customControl_Click&quot;/&gt;
      &lt;TextBlock Name = &quot;txtBlock&quot;  
       Width = &quot;250&quot; Height = &quot;30&quot;/&gt;
  &lt;/StackPanel&gt;
  </code></pre>
  
  <p>Generic.xaml</p>
  <pre><code>&lt;ResourceDictionary
  xmlns=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;
  xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;
  xmlns:local=&quot;clr-namespace:WPFCustomControl.NewFolder1&quot;&gt;
  
  &lt;Style TargetType=&quot;{x:Type local:MyCustomControl}&quot; BasedOn = &quot;{StaticResource {x:Type Button}}&quot;&gt;
      &lt;Setter Property = &quot;Background&quot; Value = &quot;LightSalmon&quot; /&gt;
      &lt;Setter Property = &quot;Foreground&quot; Value = &quot;Blue&quot;/&gt;
  &lt;/Style&gt;
  </code></pre>
  
  <p>Everything works as expected.
  My issue is when I move the Themes folder into the NewFolder1 the application compiles but no Style is implemented.</p>
  <p>Thank you in advance for any advice on how to resolve this.</p>