title: WPF ''local' is an undeclared prefix
body: <p>I have a problem with a defined <code>local</code> alias; why is it not valid?</p>
  <p>I have all of these classes which are not found.</p>
  <p>Error list</p>
  <pre><code>Error   3   ''local' is an undeclared prefix. Line 1, position 2.' XML is not valid.    c:\..\SofiaCarRental.WPF\Views\AddEditWindow.xaml   1   2   SofiaCarRental.WPF
  Error   5   The attachable property 'Resources' was not found in type 'Window'. c:\..\SofiaCarRental.WPF\Views\AddEditWindow.xaml   8   6   SofiaCarRental.WPF
  Error   2   The name &quot;NullableBooleanConverter&quot; does not exist in the namespace &quot;clr-namespace:SofiaCarRental.WPF.Views&quot;.   c:\..\SofiaCarRental.WPF\Views\MainWindow.xaml  10  9   SofiaCarRental.WPF
  Error   1   The namespace prefix &quot;local&quot; is not defined.    c:\..\SofiaCarRental.WPF\Views\AddEditWindow.xaml   1   1   SofiaCarRental.WPF
  Error   4   The type 'local:BaseDialogWindow' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.  c:\..\SofiaCarRental.WPF\Views\AddEditWindow.xaml   1   2   SofiaCarRental.WPF
  Error   8   The type 'local:EmptyStringConverter' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.  c:\..\SofiaCarRental.WPF\Views\AddEditWindow.xaml   11  10  SofiaCarRental.WPF
  Error   6   The type 'local:NullableBooleanConverter' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.  c:\..\SofiaCarRental.WPF\Views\AddEditWindow.xaml   9   10  SofiaCarRental.WPF
  Error   7   The type 'local:YearConverter' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. c:\..\SofiaCarRental.WPF\Views\AddEditWindow.xaml   10  10  SofiaCarRental.WPF
  </code></pre>
  <p>Main Window (here I specified 'local')</p>
  <pre><code>&lt;Window x:Class=&quot;SofiaCarRental.WPF.Views.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:telerik=&quot;http://schemas.telerik.com/2008/xaml/presentation&quot;
      xmlns:local =&quot;clr-namespace:SofiaCarRental.WPF.Views&quot; 
      Title=&quot;Sofia Car Rental&quot; 
      Height=&quot;720&quot; Width=&quot;1280&quot;
      MinHeight=&quot;720&quot; MinWidth=&quot;1280&quot;&gt;
  &lt;Window.Resources&gt;
      &lt;local:NullableBooleanConverter x:Key=&quot;booleanConverter&quot; /&gt;
      &lt;Style x:Key=&quot;checkBoxColStyle&quot; TargetType=&quot;telerik:GridViewCell&quot;&gt;
          &lt;Setter Property=&quot;HorizontalContentAlignment&quot; Value=&quot;Center&quot; /&gt;
      &lt;/Style&gt;
  &lt;/Window.Resources&gt;
  &lt;Grid HorizontalAlignment=&quot;Stretch&quot; VerticalAlignment=&quot;Stretch&quot; Width=&quot;Auto&quot;&gt;
     ...
  &lt;/Grid&gt;&lt;/Window&gt;
  </code></pre>
  <p>AddEditWindow</p>
  <pre><code>&lt;local:BaseDialogWindow x:Class=&quot;SofiaCarRental.WPF.Views.AddEditWindow&quot;
      xmlns:telerik=&quot;http://schemas.telerik.com/2008/xaml/presentation&quot; 
      xmlns=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;
      xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;
      Title=&quot;AddEditWindow&quot; 
      Height=&quot;417&quot; Width=&quot;383&quot;
      Title=&quot;{Binding Path=Title}&quot;&gt;
  &lt;Window.Resources&gt;
      &lt;local:NullableBooleanConverter x:Key=&quot;booleanConverter&quot; /&gt;
      &lt;local:YearConverter x:Key=&quot;yearConverter&quot; /&gt;
      &lt;local:EmptyStringConverter x:Key=&quot;emptyStringConverter&quot; /&gt;
  &lt;/Window.Resources&gt;
  &lt;Grid Margin=&quot;20,10,50,10&quot;&gt;
     ...
  &lt;/Grid&gt;&lt;/local:BaseDialogWindow&gt;
  </code></pre>
  <p>BaseDialogWindow class:</p>
  <pre><code>namespace SofiaCarRental.WPF.Views
  {
  public class BaseDialogWindow : Window
  {
      public BaseDialogWindow()
      {
          this.Owner = App.Current.MainWindow;
          this.ShowInTaskbar = false;
          this.ResizeMode = System.Windows.ResizeMode.NoResize;
          this.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterOwner;
      }
  }}
  </code></pre>
  <p>NullableBooleanConverter</p>
  <pre><code>namespace SofiaCarRental.WPF.Views{
  public class NullableBooleanConverter : IValueConverter
  {
      public object Convert(object value, Type targetType,
          object parameter, CultureInfo culture)
      {
          object result = this.NullableBooleanToFalse(value);
          return result;
      }
      public object ConvertBack(object value, Type targetType,
          object parameter, CultureInfo culture)
      {
          object result = this.NullableBooleanToFalse(value);
          return result;
      }
      private object NullableBooleanToFalse(object value)
      {
          if (value == null)
          {
              return false;
          }
          else
          {
              return value;
          }
      }
  }}
  </code></pre>