views:

964

answers:

2

I'm looking at using CompositeWPF (http://www.codeplex.com/CompositeWPF) - aka Prism, to build an application I am working on.

The application isn't a traditional LOB application, however it does present data and state information to the user.

One thing which I am unsure of is if CompositeWPF supports more than one Window or Shell. I would like to have my application notify users with a border-less window which appears in the lower RHS of the screen (think MSN notification) but still use the idea of views being injected into the region etc.

In addition to this I would like to be able to react to a user action (e.g. double click on something), hide the main window and present a progress dialog while work is being performed.

So, is this possible?

+3  A: 

I have been using Composite wpf for a couple of months and see no reason why you should be unable to do the things you ask.

I would probably not go the multiple shell route, there is a 'Composite wpf contrib project' which defines a 'WindowRegionAdaptor' which is supposed to make it easy to show views in seperate windows (See here: http://www.codeplex.com/CompositeWPFContrib ) I have not used it but have used some of the other contrib items and they work as advertised. Though the documentation is currently scant to non-existent on some of them the forums can be useful.

I would have to try it out but you could use the event aggregator to publish an event on your double click action

eventAggregator.GetEvent<MainWindowShowEvent>().Publish(false);

which the ShellPresenter could subscribe to and call on to the shell view to hide on receipt:

eventAggregator.GetEvent<MainWindowShowEvent>().Subscribe(b => View.Show(b) );

then use the WindowRegionAdaptor to display your progress dialog and subsequently on completion publish a second event that the main window subscribes to which causes it to show again.. (above I used the payload instead to indicate whether the shell should show or hide)

hope some of that helps - all untested

Trev

Trev
Thanks for your answer - I was almost wondering if anyone would be able to help me. The link you provided looks great - I'll look into it (when I can find time) and report back with the result :D
Matthew Savage
+3  A: 

Hi Matthew,

You can also review the following post:

Hope this helps,

Ezequiel Jadib

http://blogs.southworks.net/ejadib

ejadib