0

I have got a simple UI with Grids.

How to get specyfic grid abosolute possition to screen or main window.

I want to get grid and move mouse coursor to the center of them.

So I have a grid:

<Page...>
...
<Grid x:Name="grid"></Grid>
...
</Page>

Now I want use code behind to move mouse cursor to center of this grid:

Point p=new Point();
??? How to get possition of Grid to Screen?
InputSimulator.MoveMouseto(p.X,pY);
Cœur
  • 37,241
  • 25
  • 195
  • 267
Norbert Pisz
  • 3,392
  • 3
  • 27
  • 42
  • Could you please elaborate a litte mode about the issue, appreciate if you could share some code what you are trying to do. – pushpraj Jun 10 '14 at 06:54
  • Exchange grid with canvas or vice versa: possible duplicate of [Get Mouse Position on Canvas (But NOT on window)?](http://stackoverflow.com/questions/5690698/get-mouse-position-on-canvas-but-not-on-window) – Stefan Over Jun 10 '14 at 07:21
  • We don't move the mouse cursor... the mouse moves the mouse cursor. As a user of your application, I'd get annoyed if you kept moving the mouse cursor. Perhaps you could explain why you want to do that? – Sheridan Jun 10 '14 at 07:55
  • I want to move cursor by code. I developing app for Disabled People and they will be able to move mose cursor by voice so I need the possition of grid to screen. – Norbert Pisz Jun 10 '14 at 08:06

0 Answers0