Thursday, 15 April 2010

c# - Caliburn Micro publish / subscribe -


I am working through the following tutorials and I am currently stuck in the published / subscription part.

I have everything set up, so it should actually publish the events, but the message of subscribing does not get the message.

I have done the following:

Publishing View Model:

  [Export (typical (colorful visual model)) Public class color vivo model: Property Of course {Private Readonly Event Aggregator Agents; [Importer resource] public color visual model (event aggregator events) {this.events = events; } Public Zero Red () {this.events.PublishOnUIThread (New ColorEvent (New SolidColorBrush (Colors.Red))); } Public zero green () {this.events.PublishOnUIThread (New ColorEvent (New SolidColorBrush (Colors.Green)); } Public Zero Blue () {this.events.PublishOnUIThread (New ColorEvent (New SolidColorBrush (Colors.Blue)); }}  

See subscription:

Am I missing something or why is not I asked after publishing the color avalanche to my handle method?

Thanks in advance

Where is the event aggregator coming from? Is there an example that is shared between AppViewModel and ColorViewModel ?

Is the event aggregator registered as a single or in equal Ninject?


No comments:

Post a Comment