I apologize in advance for the rambling nature of this question, but I have no idea where to start.
I have an issue where I am trying to open an excel file in Silverlight, and do some processing on that excel file... but I have two major issues with doing this on the main thread.
- while opening the excel file the UI freezes
- with several asynchronous calls I have found that the asynccompleted callback is only happening when the UI thread ends (in my case when a messagebox opens)
So I am trying to write a background worker to do my processing tasks on, but I can't find any decent examples (they all are very simplistic). Are there any resources around for backgroundworker patterns?
When I tried to write one I came up with the following issues
I could not access variables at class level (if I only want the variable for my backgroundworker should I have a separate backgroundworker class?)
Displaying messageboxes, and pausing mid background thread is overly complicated (does this mean I should have lots of little background workers?)
Related to 2 how to display error messages.