title: Get a Bound Object from a control
body: <p>I have the following xaml:</p>
  
  <pre><code>&lt;ItemsControl&gt;
      &lt;ItemsControl.ItemTemplate&gt;
          &lt;DataTemplate&gt;
              &lt;Button Content="{Binding Name}"&gt;&lt;/Button&gt;
          &lt;/DataTemplate&gt;
      &lt;/ItemsControl.ItemTemplate&gt;
  &lt;/ItemsControl&gt;
  </code></pre>
  
  <p>In my code I have an event that gives me access to the button.  How can I take the button object and get the object that it's Name is bound to?</p>
  
  <p>Here is psudo code that I would like to work:</p>
  
  <pre><code>public void MyEvent(Object obj)
  {
     Button myButton = (Button) obj;
     MyBoundClass myObject = GetBoundClassFromProperty(myButton.Name);
  
     // Do something with myObject.
  }
  </code></pre>