title: Bind to an attached property with out knowing the ancestor type
body: <p>I have an attached property that looks like this:</p>
  
  <pre><code>&lt;Button Styles:ToolTip.Title="The Title"/&gt;
  </code></pre>
  
  <p>I setup a style to access show it like this:</p>
  
  <pre><code>&lt;TextBlock Text="{Binding Path=(Styles:ToolTip.Title), 
     RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}"/&gt;
  </code></pre>
  
  <p>The problem with this binding is that it can ONLY work when my property is on a Button.</p>
  
  <p>I am making a custom ToolTip feature, so I want it to work on any control that would normally show a tooltip.</p>
  
  <p>Normally I would just bind to TemplatedParent.  But that is the ContentPresenter.</p>
  
  <p>How can I get a source pointing back to the object that has the attached property on it (and not reference it statically in code)?</p>
  
  <p><a href="https://gist.github.com/4049094#file_syle.xml" rel="nofollow">Here is my full style in case it is needed.</a></p>
  
  <p>UPDATE:</p>
  
  <p>This was what did it.  I changed my RegisterAttached method's last parameter to be this:</p>
  
  <pre><code>new FrameworkPropertyMetadata(default(string), 
                                FrameworkPropertyMetadataOptions.Inherits)
  </code></pre>