Sep 16, 2010 at 10:29 AM
Edited Sep 16, 2010 at 10:37 AM
I am trying to figure out what is the best way to get CM to bind views and models so that different instances of the same view is binded to the same instance of a view model
DetailsView(instance1) <--> DetailsViewModel(instance1)
DetailsView(instance2) <--> DetailsViewModel(instance1)
This might come in handy where a screen has to be duplicated in parts of the application.
I tried to fool around with the context idea, and it could be made to work but the hack is ugly. I would basically have to specify 2 view contexts that are copies of each other OR create the view I want duplicated and embed that view
in another view.(That way you don't have code duplication) Then you would have to somehow know when to use the one context and when to use the other.
This seems all wrong to me.
What is the proper way of achieving this?