title: WPF ListBox Button Selected Item
body: <p>I have a listbox with some textblocks and a button -- in the button's codebehind it calls a method passing the currently selected listbox item, this works great. The issue is that when I select an item and then click the button on another item it doesn't update the "SelectedItem" property -- is there a way Xaml or C# that I can force a button click to select the parent ListBoxItem?</p>
  
  <p><strong>Xaml</strong></p>
  
  <pre><code>&lt;DataTemplate&gt;
      &lt;Grid&gt;
          &lt;Button x:Name="myButton" Click="myButton_Click" Height="30" Width="30"&gt;
              &lt;Image Source="Resources\Image.png" /&gt;
          &lt;/Button&gt;
          &lt;TextBlock Text="{Binding DataField}"&gt;&lt;/TextBlock&gt;
      &lt;/Grid&gt;
  &lt;/DataTemplate&gt;
  </code></pre>