Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Default cursor in WPF?

Tags:

I am changing cursor of a control in WPF.

btn.Cursor = Cursors.Wait; 

After carrying out an operaton, I want to revert back to the default cursor, I am did not find any Cursors.Default, how to get the default cursor ?

like image 777
Brij Avatar asked Apr 24 '13 10:04

Brij


1 Answers

You can override the cursor instead of setting the cursor, like this:

Mouse.OverrideCursor = Cursors.Wait; 

Then when the operation is carried out, you can remove the override by setting it to null, like this:

Mouse.OverrideCursor = null; 
like image 183
Eirik Avatar answered Oct 16 '22 16:10

Eirik