I have a VisualStudio Add-in (plug-in), when the function of this Add-in is triggered, it will take a few seconds to finish. During this period, the UI is blocked. How can I avoid blocking the UI?
- Is this an add-in you wrote or maintain the code for? Or is it a 3rd-party add-in?Jordan Parmer– Jordan Parmer2013-04-09 21:52:23 +00:00Commented Apr 9, 2013 at 21:52
- This is a add-in that I'm writing.jasonweiyi– jasonweiyi2013-04-10 09:11:50 +00:00Commented Apr 10, 2013 at 9:11
Add a comment |
1 Answer
Do the actual work in a thread such as a BackgroundWorker. This will keep the UI thread responsive since it isn't handling the expensive operation.