when user clicks on one of the available items (modules) available in his list I will use following code to create a new instance of selected item (user control) and then add it to my tabGroupArea .
object uc = Activator.CreateInstance(Type.GetType("myNamespace." + selectedItem.Parameter1Value), selectedItem);
Infragistics.Windows.DockManager.ContentPane contentPane = new Infragistics.Windows.DockManager.ContentPane();
contentPane.Content = uc;
tabGroupArea.Items.Add(contentPane);
the problem that I have is when the selectedItem has usercontrols inside it initializeComponent() will take a while to complete meanwhile the application will freeze and user can’t do any thing ,I tried different ways to put
object uc = Activator.CreateInstance(Type.GetType("myNamespace." + selectedItem.Parameter1Value), selectedItem);
in a separate thread (Backgroundworker,thread and delegate) so I would be able to show user a loadin page .but I couldn’t find anyway to do that .
any help would be appreciated .
thanks.
See this blog post.
Catel uses this approach for the PleaseWaitWindow.