wpf c# load user control in a separate thread -


when user clicks on 1 of available items (modules) available in list use following code create new instance of selected item (user control) , add 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 have when selecteditem has usercontrols inside initializecomponent() take while complete meanwhile application freeze , user can't thing ,i tried different ways put

object uc = activator.createinstance(type.gettype("mynamespace." + selecteditem.parameter1value), selecteditem); 

in separate thread (backgroundworker,thread , delegate) able show user loadin page .but couldn't find anyway . appreciated . thanks.

see this blog post.

catel uses approach pleasewaitwindow.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -