As titled, I want to make my application more user friendly by moving the mouse to the OK or Cancel button automatically (I got got affected some game…).
I know first thing I need is get the MainWindow application location, then + the location of the Button.
But how to do I get the location if the button is inside a Grid not Canvas? And if the Button is contains inside another control?
If you have the
Button bYou could use
b.PointToScreen(..)to get a specific point on the button into screen coordinates.