C# Event routing in code behind
Posted
by Nate
on Stack Overflow
See other posts from Stack Overflow
or by Nate
Published on 2010-03-19T03:44:46Z
Indexed on
2010/03/19
3:51 UTC
Read the original article
Hit count: 209
I'm building a WPF MVVM-ish application. I want to be able to display an event log containing items in a collection that exists in my viewmodel. I want any of the objects in the model to be able to add data to the event log. Therefore every object needs to be able to pass data back to one central collection for databinding in the view. I could implement an event in every one of my data classes and manually pass the events up the object heirarchy but this seems super clumsy. On the visual tree a Routed Event would take care of this, is there some equivelent in the model scope? Any other ideas?
© Stack Overflow or respective owner