This is probably more of an MVVM question than a Catel question, but the correct solution is clear to me and I'm hoping for an arrow in the right direction. What is the best way to display a full set of options as checkboxes, where only the checked
items are added to a model property?
Let's say we have Sundae models that contain a collection of Topping models, of which there is a master list (Peanuts, Caramel, etc.). I want to display the full list as checkboxes in an ItemsControl and allow the user to make selections.
If my SundaeModel exposes the master list of Toppings, Catel will generate the corresponding ToppingModel for each one. However, setting the IsSelected property on ToppingModel based on the set of SelectedToppings is a challenge because SundaeModel
doesn't have references to the viewmodels. I can get this to work using InterestedIn but that creates more problems when multiple SundaeViews are on screen at once.
Is this a situation where SundaeModel should directly create a collection of ToppingModels rather than let Catel do it?