title: Set custom window property in xaml
body: <p>I have the following code:</p>
  
  <pre><code>public partial class NewWindow: Window
  {
      public static readonly DependencyProperty PropNameProperty =
          DependencyProperty.Register(
                      "PropName",
                      typeof(int),
                      typeof(NewWindow),
                      null);
  
      public int PropName
      {
          get
          {
              return (int)GetValue(PropNameDependencyProperty);
          }
          set
          {
              SetValue(PropNameDependencyProperty, value);
          }
      }
  </code></pre>
  
  <p>Now when I try to use my new property I can't compile:</p>
  
  <pre><code>&lt;Window x:Class="AppName.NewWindow"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:sys="clr-namespace:System;assembly=mscorlib"
      xmlns:my="clr-namespace:AppName"
      Title="NewWindow" Height="300" Width="300"
      PropName="5"                          &lt;-"property does not exist" error here
      &gt;
  </code></pre>
  
  <p>I'm probably just misunderstanding something, but I'm not sure what.</p>