Pop-up notifier a good candidate for two shells?

Topics: Prism v2 - WPF 3.5
Jun 8, 2009 at 8:15 PM

I'm working my way through the Composite Application Guidance for WPF and Silverlight at the moment.  I seem to recall reading somewhere (though I can't find it again) that there are cases where two shells is a sensible approach.

My current thinking is that the new app will have a main window (shell?) and a pop-up/system tray-style notifier a la Outlook.  Is this the sort of scenario where I'd use two shells?  I'm trying to work out how to implement the notifier with a module/service such that other modules can make use of it and my head is spinning.

I would appreciate any advice you can offer.

Jun 9, 2009 at 5:08 PM


As you said, having 2 shells is not the usual scenario for most applications, but prism does support applications with multiple shells.

From Composite Application Guidance for WPF documentation: Shell and View (Technical Concept)

"You do not have to have a distinct shell as part of your application architecture to use the Composite Application Library. If you are starting a new composite WPF application from the very beginning, implementing a shell provides a well-defined root and initialization pattern for setting up the main user interface of your application. However, if you are adding Composite Application Library features to an existing application, you do not have to change the basic architecture of your application to add a shell. Instead, you can alter your existing window definitions to add regions or pull in views as needed. "   


Erwin Van Der Valk, developer in the Prism-v2 project, has created an Outlook style sample application that seem to be very similar to your application:

·         how to build an outlook style application – part 1

·         how to build an outlook style application with prism v2 – Part 2

Though I don't know your exact scenario, you might find useful the RegionPopupBehaviors used in the Stock Trader RI sample. The following thread deal with similar situations:

·         Popup Region            


Regarding the communication between modules, you might use the EventAggregator  service to communicate decoupled publishers and subscribers. Ward Bell wrote a great post about the prism event aggregator: Event Aggregator in Prism Explorer. You might also find useful the following articles in the documentation:

·         Event Aggregation QuickStart

·         How to: Create and Publish Events

If you want to register any other service you might check How to: Register and Use Services

Hope it helps! 

Matias Bonaventura

Jun 9, 2009 at 9:31 PM

Thanks for the detailed reply.  I've read through some of the documents you've suggested already but I hadn't come across the outlook-style sample app. and I've only just had a chance to run the Stock Trader RI today - it took a while to get everything installed on my PC at work.  I'll have a think about the pop-ups in the RI and I'll have a look at the outlook-style sample as well.

Thanks again.