简体   繁体   中英

Getting the clicked mouse coordinates from a Image Box in C#/WPF

In order to work with an image I need to make the user select certain(4) coordinates within a Image Box and afterwards save that coordinate data and close the window. The project is using C# and WPF. Sadly google is giving me a lot of unfocused solutions on this topic. Any suggestions/ links?

thanks

Point pos = Mouse.GetPosition(myElement); will give you the mouse position relative to the element.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM