how to change the pointer cursor in winUI?

mc 5,426 Reputation points
2023-09-21T06:31:27.35+00:00

I am using winui3

how to change the pointer cursor.

Windows development Windows App SDK
{count} votes

Accepted answer
  1. Jeanine Zhang-MSFT 11,356 Reputation points Microsoft External Staff
    2023-09-21T06:56:20.2433333+00:00

    Hello,

    Welcome to Microsoft Q&A!

    You could try to use UIElement.ProtectedCursor Property.

    You need to subclass the UI element that you want the cursor to be changed in, and then add a method that sets a ProtectedCursor property.

    For more details you could refer to the thread: https://github.com/microsoft/WindowsAppSDK/discussions/1816

    Thank you.

    Jeanine


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.