Reputation: 149
I have an Image control running in my MainWindow.xaml, I was wondering if I can get the X and Y coordinates to the pixel clicked from the RoutedEventArgs on the MouseUp event for the control? I don't need the color or anything at that pixel, I would just like to know where that pixel was. Thank you for the help.
Upvotes: 0
Views: 1795
Reputation: 63317
You can try handling the MouseLeftButtonUp
event:
private void image1_MouseLeftButtonUp(object sender, MouseButtonEventArgs e){
Point pos = e.GetPosition(image1);
}
Upvotes: 1