title: C# WPF Want the child of the Stackpanel on click
body: <p>I am using StackPanels. In my application I have to show a multi tiff with 3 to x images and have to open them in a new window after I click on one of them.</p>
  
  <p>Showing them is easy:</p>
  
  <pre><code>public void Bilder_anzeigen(string path)
  {
      TiffBitmapDecoder decoder = new TiffBitmapDecoder(new Uri(path), BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.Default);
  
      foreach (var i in decoder.Frames)
      {
          Image myImage = new Image();
          myImage.Source = i;
          Stackpanel_Tiff.Children.Add(myImage);
      }
  }
  </code></pre>
  
  <p>But how can I get a child with a click on the StackPanel?  There is a MouseDown Event, but after it is raised, I don't know on which image i clicked. I just know there was a click.  How can I find the image that was clicked?</p>