display Hourglass when application is busy

前端 未结 9 1647
说谎
说谎 2020-11-28 03:01

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



        
9条回答
  •  Happy的楠姐
    2020-11-28 03:26

    Be careful here because fiddling with the Wait Cursor can cause some problems with STA threads. Make sure that if you use this thing that you are doing it within its own thread. I posted an example here Run inside an STA which uses this to show a WaitCursor while the spawned file is starting up, and does not blow up (the main application) AFAICT.

提交回复
热议问题