title: WPF: Mouse double click on Image using interaction
body: <p>I'm trying to use interaction features to achieve mouse double click on standard Image control. The Image control is on UserControl and method that should handle mouse double click is on view model. The code is as following:</p>
  
  <p>1) UserControl:</p>
  
  <pre><code>&lt;ItemsControl Grid.Row="0" ItemsSource="{Binding SelectedEventPhotoList}"
              HorizontalAlignment="Stretch"
              VerticalAlignment="Stretch"                  
              Name="SelectedListView"&gt;
      &lt;ItemsControl.ItemsPanel&gt;
          &lt;ItemsPanelTemplate&gt;
              &lt;UniformGrid Rows="1" Columns="3"/&gt;
          &lt;/ItemsPanelTemplate&gt;
      &lt;/ItemsControl.ItemsPanel&gt;
      &lt;ItemsControl.ItemTemplate&gt;
          &lt;DataTemplate&gt;
              &lt;Image Source="{Binding}" Stretch="None"&gt;
                  &lt;i:Interaction.Triggers&gt;
                      &lt;i:EventTrigger EventName="MouseDoubleClick"&gt;
                          &lt;ei:CallMethodAction MethodName="DblClick" TargetObject="{Binding}"/&gt;
                      &lt;/i:EventTrigger&gt;
                  &lt;/i:Interaction.Triggers&gt;
              &lt;/Image&gt;
          &lt;/DataTemplate&gt;
      &lt;/ItemsControl.ItemTemplate&gt;
  &lt;/ItemsControl&gt;
  </code></pre>
  
  <p>3) View model:</p>
  
  <pre><code>public void DblClick()
  {
      MessageBox.Show("Double click!");
  }
  </code></pre>
  
  <p>But, it doesn't work.</p>
  
  <p>UPDATE:</p>
  
  <p>I did this, but it doesn't work:</p>
  
  <p>1) XAML:</p>
  
  <pre><code>&lt;ItemsControl Grid.Row="0" ItemsSource="{Binding SelectedEventPhotoList}"
              HorizontalAlignment="Stretch"
              VerticalAlignment="Stretch"                  
              Name="SelectedListView"&gt;
      &lt;ItemsControl.ItemsPanel&gt;
          &lt;ItemsPanelTemplate&gt;
              &lt;UniformGrid Rows="1" Columns="3"/&gt;
          &lt;/ItemsPanelTemplate&gt;
      &lt;/ItemsControl.ItemsPanel&gt;
      &lt;ItemsControl.ItemTemplate&gt;
          &lt;DataTemplate&gt;
                  &lt;Image Source="{Binding}"&gt;
                      &lt;Image.InputBindings&gt;
                          &lt;MouseBinding MouseAction="LeftDoubleClick" Command="{Binding MouseDoubleClickCommand}"/&gt;
                      &lt;/Image.InputBindings&gt;
                  &lt;/Image&gt;
          &lt;/DataTemplate&gt;
      &lt;/ItemsControl.ItemTemplate&gt;
  &lt;/ItemsControl&gt;
  </code></pre>
  
  <p>2) View model:</p>
  
  <pre><code>public DelegateCommand MouseDoubleClickCommand { get; private set; }
  </code></pre>
  
  <p>In constructor:</p>
  
  <pre><code>MouseDoubleClickCommand = new DelegateCommand(DblClick);
  </code></pre>
  
  <p>And added method:</p>
  
  <pre><code>public void DblClick()
  {
      MessageBox.Show("Double click!");
  }
  </code></pre>