views:

82

answers:

1

Hi all,

I'm starting with prism after seeing the videos on codeplex, and I'm trying to make a very easy thing.

  • Display a view with a button
  • Click on the button
  • Display another view after the click

Should I use an event aggregator ?

How to publish an event without parameters ?

How to subscribe to this event and display the another view ?

Any code sample would be appreciated. Thanks in advance for any help, Best regards

+1  A: 

There's a lot of questions here. I've published a sample. The main thing to take away here is that you don't have, and in fact shouldn't, use the EventAggregator for this.

EventAggregator is for "fire and forget" messages where you can't guarantee that there are any listeners. If you are expecting a listener, you should likely not be using EventAggregator.

I've posted a sample that does what I think you want. There is a "Menu" view that opens other views using a "service" made available in the IoC container. http://dl.dropbox.com/u/376992/CAGMenus.zip

Hopefully this helps.

Anderson Imes
many thanks for your answerI don't understand everything for now, but I will try :)Best regards
Tim