title: CustomControl, objects don't exist in namespace
body: <p>Confused as to what is going wrong here, i'm getting an error saying <code>local:NumericValue does not exist in the namespace "clr-namespace:Controls</code> on the following</p>
  
  <pre><code>   &lt;local:NumericValue x:Key="NumericValue" /&gt; 
  </code></pre>
  
  <p>And getting <code>The member "Template" is not recognized or is not accessible</code> on this line:</p>
  
  <pre><code>&lt;Setter Property="Template"&gt;
  </code></pre>
  
  <p>I can't figure out why, I have attempted to add <code>Assembly=Controls</code> to the end of the <code>local</code> property in the ResourceDictionary tag, and I have clicked <code>Clean Solution</code> and <code>Rebuild Solution</code> multiple times in case it's a build error but still getting the same issue!</p>
  
  <p>Here is the code;
  <strong>XAML - Themes/Generic.xaml</strong></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:Controls"&gt;
      &lt;local:NumericValue x:Key="NumericValue" /&gt;
  
      &lt;Style TargetType="{x:Type local:NumericUpDown}"&gt;
          &lt;Setter Property="Template"&gt;
              &lt;Setter.Value&gt;
                  &lt;ControlTemplate TargetType="{x:Type local:NumericUpDown}"&gt;
                      &lt;Grid&gt;
                          &lt;Grid.ColumnDefinitions&gt;
                              &lt;ColumnDefinition /&gt;
                              &lt;ColumnDefinition /&gt;
                              &lt;ColumnDefinition /&gt;
                          &lt;/Grid.ColumnDefinitions&gt;
  
                          &lt;Button Grid.Column="0"&gt;
                              &lt;Button.Content&gt;
                                  &lt;Path Data="M0,0 L1,0 0.5,1Z" 
                                        Width="20" 
                                        Height="20" 
                                        Fill="White"
                                        Stretch="Fill"/&gt;
                              &lt;/Button.Content&gt;
                          &lt;/Button&gt;
  
                          &lt;TextBox Grid.Column="1" Text="{Binding Source={StaticResource NumericUpDown},Path=value}" /&gt;
  
                          &lt;Button Grid.Column="2"&gt;
                              &lt;Button.Content&gt;
                                  &lt;Path Data="M0,1 L1,1 0.5,0Z" 
                                        Width="20" 
                                        Height="20" 
                                        Fill="White" 
                                        Stretch="Fill" /&gt;
                              &lt;/Button.Content&gt;
                          &lt;/Button&gt;
                      &lt;/Grid&gt;
                  &lt;/ControlTemplate&gt;
              &lt;/Setter.Value&gt;
          &lt;/Setter&gt;
      &lt;/Style&gt;
  &lt;/ResourceDictionary&gt;
  </code></pre>
  
  <p><strong>Code Behind - NumericUpDown</strong></p>
  
  <pre><code>using System.Windows;
  
  namespace Controls
  {
      public class NumericUpDown : FrameworkElement
      {
          static NumericUpDown()
          {
              DefaultStyleKeyProperty.OverrideMetadata(typeof(NumericUpDown), 
                  new FrameworkPropertyMetadata(typeof(NumericUpDown)));
          }
      }
      public class NumericValue
      {
          private int _value;
          public int value
          {
              get { return _value; }
              set { _value = value; }
          }
      }
  }
  </code></pre>