“Not Responding” in window title when running in new process

前端 未结 8 1292
清酒与你
清酒与你 2021-02-07 14:39

I have a long running method that must run on UI thread. (Devex - gridView.CopyToClipboard())

I do not need the UI to be responsive while c

8条回答
  •  忘了有多久
    2021-02-07 15:05

    Okay, the 'Not Responding' and window artifacting you've described are just symptoms of running a long term activity on your UI thread. The UI thread is blocked, so the UI is frozen. There is no avoiding this. To be honest, it's just 'lucky' that your application appears as responsive as it does.

    As far as I can see every workaround that has been described here is just a hack to fudge the fact that your UI thread is frozen. Don't do this. Fix your program so the UI thread isn't frozen.

    Ask yourself: do my users really need to copy all the rows from this view? Can the data be filtered in some way to limit the rows? If not, there is a property called MaxRowCopyCount which limits the number of rows that are copied - can this be leveraged without breaking your workflow?

    Finally, if all else fails, is there some other medium you can use (perhaps an intermediate file), to which data can be copied on a background thread?

提交回复
热议问题