title: How can I execute a command binding on MouseEnter of a StackPanel in WPF?
body: <p>I'm using MVVM. </p>
  
  <pre><code>&lt;ItemsControl ItemsSource="{Binding AllIcons}" Tag="{Binding}"&gt;
      &lt;ItemsControl.ItemTemplate&gt;
          &lt;DataTemplate&gt;
              &lt;StackPanel&gt;
                  &lt;Label HorizontalAlignment="Right"&gt;x&lt;/Label&gt;
                  &lt;Image Source="{Binding Source}" Height="100" Width="100" /&gt;
                  &lt;Label HorizontalAlignment="Center" Content="{Binding Title}"/&gt;
              &lt;/StackPanel&gt;
          &lt;/DataTemplate&gt;
      &lt;/ItemsControl.ItemTemplate&gt;
  &lt;/ItemsControl&gt;
  </code></pre>
  
  <p>That looks fine. If I put a button in the stack panel using this command:</p>
  
  <pre><code>&lt;Button Command="{Binding Path=DataContext.InvasionCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ItemsControl}}}" CommandParameter="{Binding}"/&gt;
  </code></pre>
  
  <p>I'm able to capture the command.  However, I want to execute the command binding when the mouse enters the stack panel, not when I click a button.</p>
  
  <p>Any idea?</p>