To keep the map and the progress bar responsive while generating a couple hundred point graphics in code-behind with a handful of calculated attributes, I'm trying to do it in a background worker thread using the backgroundworker class. However, even this single line
Dim g As New Graphic
as the first and only line in the RunWorkerAsync handler, a cross thread error is generated.
I use the backgroundworker class in other ESRI silverlight projects and it's really handy. However, this is the first time trying to generate graphics. Is this just not possible?
As a graphic contains an UI element, it needs to be created in the UI thread.
If you have lot of calculated attributes, you can do it in a background thread but you need to store the results in an intermediate structure. Then you need to come back to the UI thread to create the graphics.
As a graphic contains an UI element, it needs to be created in the UI thread.
If you have lot of calculated attributes, you can do it in a background thread but you need to store the results in an intermediate structure. Then you need to come back to the UI thread to create the graphics.