Is it possible from PRISM to invoke a WPF window or a view within a Separate UI Threads

Topics: Prism v4 - WPF 4
May 12, 2011 at 11:54 AM


Can anyone guide me on how to open up a new window in different thread.  I am not able to get any link/article on this.

May 12, 2011 at 3:45 PM

Hi,

Since this is not strictly related to Prism, you might find this thread from WPF forums useful where this scenario is covered.

Thanks,

Miguel Bronzovic
http://blogs.southworks.net/mbronzovic

 

May 13, 2011 at 4:13 AM

hey thanks for the reply. I could find the solution in plain WPF application but I am not able to figure out the way to do it in WPF application which is built on Prism 4.

If I have a Prism 4 application and want to initate a pop up window into a seperate thread to avoid the UI thread burden , is there any way to do this?

 

May 13, 2011 at 7:48 PM

Hi,

You could try to create a Region behavior in order to fulfill your scenario. You might find handy the DialogActivationBehavior provided with the Stock Trader Reference Implementation.

Take into account that this behavior will not guaranteed the same features you have when starting a Prism application. You will have to find a way to access the region manager, make use of the Event aggregator, among others.

Another possibility would be to have two bootstrappers, one for each “UI Thread”, so that you have all the resources you need available in that thread, as a separate extension of your application.

Thanks,

Miguel Bronzovic
http://blogs.southworks.net/mbronzovic