Two Shell problem ?

May 20, 2009 at 8:48 PM

I have a strange problem .  when i compile my solution , I got 2 shells ? can anyone help me where could be the problem ? I followed the Stocktrader implementation as reference project ...

Thanks !


May 21, 2009 at 9:26 PM

Hi Kumar,


One possible reason for this to be happening could be that the Application class has the StartupUri attribute set (to Shell.xaml or the name of your shell).

<Application x:Class="HelloWorld.App"





Thus, since the bootstrapper creates and shows an instance of the shell, and the StartupUri does the same thing (but without attaching RegionManagers), you will have two Shells.


If this is the case the following document from the Prism-v2 documentation might be useful for you (assuming you are using Prism-v2 WPF):

·         How to: Create a Solution Using the Composite Application Library for WPF


If this is not your scenario, please send more information to try and reproduce the issue.


Please let me know if this helps.


Damian Schenkelman

May 22, 2009 at 12:48 AM

Hi Damian,

That's the problem , I forgot to remove the startupuri value  in App class ! 

Thank you very much ! 




Sep 9, 2009 at 10:24 AM

I had a similar problem but the cause was different.

I tried to create view dynamically and add it to region using region.Add/Activate. The view wouldn't show up. The problem was in my Bootstrapper code and you can see the solution in the"Activate does not show the view" thread at