title: How do I implement a blend/wpf attached behavior that refrences another control as a property?
body: <p>I'm trying to implement a behavior that works on an object, but is affected by a second object.</p>
  
  <p>As an example, it will change the appearance of the framework element based on the distance of another framework element.</p>
  
  <p>I know just enough about attached behaviors to be dangerous, and I would define my class like this : </p>
  
  <pre><code> public class ChangeWithDistance : Behavior&lt;FrameworkElement&gt;
  </code></pre>
  
  <p>And somewhere in the behavior I would need a dependency property that would point at the name(?) of the other control.</p>
  
  <p>What is the class I should make my dependency property so that I can have this behavior point to another control?</p>
  
  <p>Would I specify the propdp as a string that represents the name of the other control?  </p>
  
  <p>Or is there another class I should use that signifies the tag associated with a control (you know, that x:Name business..)</p>
  
  <p>Or should the propdp be pointing at a framework element like this?</p>
  
  <pre><code>    public static readonly DependencyProperty OtherControl =     
            DependencyProperty.Register("OtherControl", typeof(FrameworkElement)
  </code></pre>
  
  <p>Or do I do something with binding?</p>
  
  <p>Is there a best practice of how to point a behavior or really anything that has a dependency property at another control?</p>
  
  <p>Is there a way to make it show up so a user using blend can select the other control?</p>