سؤال

I want to know if there is a way to hide cursor in Windows 8 Metro mode. I found this answer, but then I don't know how to obtain the "unique resource id" for the second parameter of the cursor constructor (below).

Window.Current.CoreWindow.PointerCursor = 
                new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Custom, 1);

EDIT: Forgot to mention that I need to handle mouse events normally so the answer below of setting cursor to null will not suffice.

هل كانت مفيدة؟

المحلول

Set the cursor to a custom cursor but make it just be blank...this allows you to track it like being a normal cursor.

نصائح أخرى

You can set the PointerCursor object to NULL. As soon as you move over something like a text box, it will reset it back though. So you probably need to handle mouse over events on various controls, to hide it. This all depends on your complete scenario tough.

Also, before setting it to NULL, you can save the value of the property (PointerCursor) and then when you're done, set it back.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top