For a view constructed using WPF, I want to change the mouse cursor to a hourglass when the application is busy and nonresponsive.
One solution is to add
The best way would be to not cause the UI to become non-responsive ever, offloading all of the work to other threads/tasks as appropriate.
Other than that, you're kindof in a catch-22: if you did add a way to detect that the ui is non-responsive, there's no good way to change the cursor, as the place you'd need to do that (the even thread) is non-responsive... You might be able to pinvoke out to standard win32 code to change the cursor for the whole window, though?
Otherwise, you'd have to do it pre-emptively, like your question suggests.