locked
Setting mouse cursor position in metro app C# RRS feed

  • Question

  • Is there any way to set the cursor position in metro app c# .

    Like WPF I cannot do this in windows store app.

    Cursor.Position = new Point(x, y);

    Tuesday, January 28, 2014 6:23 AM

Answers

  • As far as I know, there is no such setting API.

    And in WPF, Cursor.Position Property is read/writable, but in Windows Store App, PointerPosition is read-only.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by zee_patel Tuesday, January 28, 2014 7:57 AM
    Tuesday, January 28, 2014 7:42 AM
    Moderator

All replies

  • Hi zee_patel,

    Take a look at this API: PointerPosition, I don't think we can manually set the mouse position by Windows Store App.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    Tuesday, January 28, 2014 6:33 AM
    Moderator
  • Thanks jamles for your reply,

    I can get the mouse position but is there any way to set mouse position in windows store app.

    Tuesday, January 28, 2014 7:29 AM
  • As far as I know, there is no such setting API.

    And in WPF, Cursor.Position Property is read/writable, but in Windows Store App, PointerPosition is read-only.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by zee_patel Tuesday, January 28, 2014 7:57 AM
    Tuesday, January 28, 2014 7:42 AM
    Moderator