title: Bind to DependencyProperty on Custom Class
body: <p>I'm having issues binding to a custom class.  The dependencyproperty does not seem to get the correct value from my viewmodel.  Here is my custom class:</p>
  
  <pre><code>    public class DataResource : DependencyObject
          {
  
              public static readonly DependencyProperty ContentProperty =
                  DependencyProperty.Register("Content",
                      typeof(object),
                      typeof(DataResource));
  
              public object Content
              {
                  get { return (object)GetValue(ContentProperty); }
                  set { SetValue(ContentProperty, value); }
              }
  
          }
  </code></pre>
  
  <p>And in my UserControl resources, I have:</p>
  
  <pre class="lang-xml prettyprint-override"><code>    &lt;UserControl.Resources&gt;
          &lt;local:DataResource x:Key="dataResource" Content="{Binding Test}"&gt;&lt;/data:DataResource&gt;
      &lt;/UserControl.Resources&gt;
  </code></pre>
  
  <p>"Test" in my ViewModel is a property that I can bind a Label to with no issues.  Am I doing something wrong here in this implementation?</p>
  
  <p>Update: This works if I inherit from Freezable instead of DependencyObject. I'm not quite sure why, hopefully somone can explain this.</p>