Using Prism (Composite WPF) EventAggregator (blog.donnfelker.com)

submitted by brandewinderbrandewinder(495) 1 year, 1 month ago

Imagine that your "Services" layer needs needs to send off an event that some data has changed. One way to do this would be to bubble the event to the parent layer and then let that layer bubble the event up again. For example, lets say that the Service layer changed the Customer and it wants to let any interested parties know (as it should) through an event. So it sends a "CustomerChanged" event notification. Since the only object who is watching the Service layer is the Model layer, the model layer will grab the event and then re-publish it again (bubbling it up) the object graph). As you can tell, its a royal pain to do this. Imagine the amount of code you have to write. You've to write a ton of plumbing just to bubble the event from the service to the model to the view model to the view, and vice versa. This is where an event aggregator comes in.

add a comment | category: | Views: 56

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:

Comments:

No comments so far

information Login or create an account to comment on this story