For a view constructed using WPF, I want to change the mouse cursor to a hourglass when the application is busy and non-responsive.
One solution is to add
this.Cursor = Cursors.Wait;
to all the places that may cause the UI to become non-responsive. But obviously this is not the best solution. I am wondering what is the best way to achieve this?
Is it possible to achieve this by using Styles or Resources?
We did a disposable class that changes the cursor for us when the app is going to take long, it looks like this:
And we use it like this:
Might not be the greatest design, but it does the trick =)