title: Can't bind to my dependency property
body: <p>I have a dependency property in a class which inherits from Canvas, like so:</p>
  
  <pre><code>public partial class HueVisualizer : Canvas
  {
      public HueVisualizer()
      {
          InitializeComponent();
      }
  
      public decimal InnerHue
      {
          get { return (decimal)GetValue(HueProperty); }
          set { SetValue(HueProperty, value); }
      }
  
      // Using a DependencyProperty as the backing store for InnerHue,Saturation and Luminance.  This enables animation, styling, binding, etc...
      public static readonly DependencyProperty HueProperty =
          DependencyProperty.Register("InnerHue", typeof(decimal), typeof(LuminanceVisualizer), new FrameworkPropertyMetadata((decimal)0, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault));
  }
  </code></pre>
  
  <p>I'm trying to bind to it in Xaml like so:</p>
  
  <pre><code>&lt;UserControl x:Class="Project1.UserControl1"
           x:Name="TheControl"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:project1="clr-namespace:Project1"
           mc:Ignorable="d"
           d:DesignHeight="120" d:DesignWidth="300"&gt;
  ...
      &lt;Grid Grid.Row="0" x:Name="HueGrid"&gt;
          &lt;project1:HueVisualizer x:Name="HueVisual" 
                                  InnerHue ="{Binding ElementName=TheControl, Path=Hue, Mode=TwoWay}"
                                  Height="20"
                                  Width="{Binding ElementName=TheControl, Path=Width}"/&gt;
      &lt;/Grid&gt;
  &lt;UserControl /&gt;
  </code></pre>
  
  <p>For completeness, the properties I'm trying to bind from:</p>
  
  <pre><code>    public partial class UserControl1 : UserControl, INotifyPropertyChanged
  {
  
  
      public decimal Hue
      {
          get { return (decimal)GetValue(HueProperty); }
          set { SetValue(HueProperty, value); }
      }
  
      ...
  
      // Using a DependencyProperty as the backing store for Hue.  This enables animation, styling, binding, etc...
      public static readonly DependencyProperty HueProperty =
          DependencyProperty.Register("Hue", typeof(decimal), typeof(UserControl1), new 
          FrameworkPropertyMetadata((decimal)0));
  ...
  }
  </code></pre>
  
  <p>However, when I try to run/debug the project, I get an exception on <code>InitializeComponent()</code> of <code>UserControl1</code>:</p>
  
  <pre><code>A 'Binding' cannot be set on the 'InnerHue' property of type 'HueVisualizer'. A
  'Binding' can only be set on a DependencyProperty of a DependencyObject.
  </code></pre>
  
  <p>No matter how many times I look at examples, it seems to me that InnerHue should be a valid dependency property.  I also double checked to make sure that Canvas is a DependencyObject (if it weren't, GetValue and SetValue should throw a compiler error).  What in the world am I doing incorrectly?  As I am relatively new to WPF, I can't help but feel that I'm missing something obvious.</p>