my application uses BackgroundWorker to initialize user controls and load data models for the control to keep the user interface responsive. i have a custom control which uses page view to show different custom user controls. i load data for the control and instantiate the control in a background thread. after initializations the data model and the control is added to a global list of controls. the main ui then shows the control in a tab document. now when i try to add it to the tab the page view page object throws an exception mentioning cross thread access. i have checked for cross thread access before adding the control to the tab strip. it only happens if i use a page view control inside the my custom user control. instead if i use a tab strip than page view in my custom control it works fine.
how can i avoid this exception?
how can i avoid this exception?