title: Is possible to make a WPF RelativeSource binding with AncestorType pointing to a base type?
body: <p>I want to bind a property to the parent container view having a ViewModel in its DataContext.</p>
  
  <p>This code works perfectly well when the parent is a direct instance of <strong>ConcreteClassView</strong>:</p>
  
  <pre><code>Property="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ty:ConcreteClassView}}, Path=DataContext.Name}"
  </code></pre>
  
  <p>However, the parent is not found when trying to locate it via a base class or a interface.
  Sample:</p>
  
  <pre><code>PropertyB="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ty:BaseClassView}}, Path=DataContext.Name}"
  
  PropertyB="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ty:INamedElementView}}, Path=DataContext.Name}"
  </code></pre>
  
  <p>Giving that:</p>
  
  <pre><code>class ConcreteClassView : BaseClassView, INamedElementView { }
  </code></pre>
  
  <p>Ok, Let's assume that <strong>FindAncestor</strong>, <strong>AncestorType</strong> needs the concrete type to work. </p>
  
  <p><em>But there is any workaround to locate ancestors just based on base classes or implementing a given Interface?</em> </p>
  
  <p>Thxs.</p>