title: Binding can only be set on a DependencyProperty of a DependencyObject - when property is overridden with new
body: <p>I have a class hierarchy as follows and binding to the VisibleRange property is throwing in the designer. </p>
  
  <p>Given the class hierarchy here: </p>
  
  <pre><code>// Base class
  public abstract class AxisBase : ContentControl, IAxis
  {
      public static readonly DependencyProperty VisibleRangeProperty = DependencyProperty.Register(
          "VisibleRange", typeof(IRange), typeof(AxisBase), 
           new PropertyMetadata(default(IRange), OnVisibleRangeChanged));
  
      public IRange VisibleRange
      {
          get { return (IRange)GetValue(VisibleRangeProperty); }
          set { SetValue(VisibleRangeProperty, value); }
      }
  }
  
  // Derived class
  public class DateTimeAxis : AxisBase
  {
          public new IRange&lt;DateTime&gt; VisibleRange
          {
              get { return (IRange&lt;DateTime&gt;)GetValue(VisibleRangeProperty); }
              set { SetValue(VisibleRangeProperty, value); }
          }
  }
  
  // And interface definitions
  public interface IRange&lt;T&gt; : IRange 
  {
  }
  </code></pre>
  
  <p>And designer (XAML) here: </p>
  
  <pre><code>&lt;local:DateTimeAxis Style="{StaticResource XAxisStyle}"                                               
         VisibleRange="{Binding ElementName=priceChart, 
                        Path=XAxis.VisibleRange, Mode=TwoWay}"/&gt;
  </code></pre>
  
  <p>I get this exception: </p>
  
  <blockquote>
    <p>A 'Binding' cannot be set on the 'VisibleRange' property of type 'DateTimeAxis'. A 'Binding' can only be set on a DependencyProperty of a DependencyObject.</p>
  </blockquote>
  
  <p>The derived class <code>DateTimeAxis</code> is exposing the VisibleRange property which is overridden by the <code>new</code> keyword. I can't add a generic typeparam to the base <code>AxisBase</code> class, and I also need to access the property in both classes. So, I'm wondering given these constraints, if anyone has any suggestions on how to do this better to avoid the designer exceptions?</p>