I have two ViewModels that present the same Model to different Views. One presents the model as an item in a ListBox
, the other presents it as a tab in a TabControl
. The TabControl
is to display tabs for the items that are selected in the ListBox
, so that the tabs come and go as the selection changes.
I can easily synchronise the two controls by adding an IsSelected
property to the Model and binding the ViewModels to it (a bit like this), but this will clutter the Model with presentation details that don't really belong there.
It seems like I need something between the Model and ViewModels to hold this extra state. Are there any patterns or examples of a good way to do this?