|
-
Nov 13th, 2015, 05:30 AM
#1
Thread Starter
Frenzied Member
Need help with backgrund thread and UI blocking
Hi!
On our wpf vb.net application we have a button "generate report". The report will be opened as a pdf to the user when finished. These are the steps involved:
1) Show a panel to the user with a spinning progress indicator showing "generating report"
2) Load data from database (background thread)
3) Pass the data to a report component and use it to generate a pdf (required to be on UI thread because of the component internals, get exception otherwise)
4) Use Process.Start and launch pdf reader with the path of pdf supplied in 3
5) Close progress panel
You can see the problem? I have a long running task required by 3rd party component to run on UI thread (STA) and that is effectively blocking the spinning progressbar that is also running on the UI thread. The end result from this is very choppy visuals.
How can I solve this? Can I have multiple UI threads or use Task.Run somehow to cheat the 3) so the component thinks it is running on UI thread when not?
Any ideas?
/H
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|