I have some task that’s freezing the UI for a few seconds, and in this specific case I have no other choice than execute it from the UI thread (normally I use Dispatchers).
I completely understand that my window cannot repaint itself during this time, but how do I force the mousepointer to redraw itself before executing the blocking call? Right now I do:
Me.Cursor = System.Windows.Input.Cursors.Wait
[Heavy Task]
Me.Cursor = System.Windows.Input.Cursors.Default
But the window does not update the cursor to a wait-cursor, because the UI thread is frozen? How do I force the update?
Seems I have found the solution. Instead of changing the cursor for the window, overide it globally: