title: Selecting image from StackPanel C# UWP (Adding action listener to UIElement and Image to UIElement)
body: <p>I am using C# and I am creating UWP app.
  I am using Windons.Ui.Xaml.Controls.Image and I have created follwoing code which lists my images</p>
  
  <pre><code>UxHelpers.DispatchToASTAThread(
  async () =&gt;
  {
      imageIndex++;
      StackPanel stackPanel = new StackPanel();
      stackPanel.Children.Add(image);           
  }
  this.Results.Children.Add(stackPanel);
   }).Forget();
  </code></pre>
  
  <p>This is in for loop, and I want when user clicks on certain image to be able to save it.</p>
  
  <p>I have code for saving, I just don't know how to add mouse listener to each image, so that it is marked when I move mouse over it (So user knows that by clicking on it something will happen) and when he clicks I want it to call my function with this pictures index....</p>
  
  <p>I have looked at UIElement but i still can't figure it out.</p>
  
  <p>Thanks!!</p>