Hi,
I'm asking myself how to apply MVVM in the following scenario correctly: Let's assume I have simple Master-Detail data, like a person with 0-n addresses. The addresses should be displayed in a ListBox and the user should be able to trigger certian actions for each address.
So what I did is to create a VM which returns the person model and the addresses models. The problem then is, that I want to create buttons in the address DataTemplate. But to make the buttons work I need a command exposed by each address, which can be bound to the appropriate property on the button.
My question is, if it is really the correct approach to wrap (in this case) each address in another object which the exposes the necessary functionality? I would like to avoid that I have to maintain a second list of addresses view models, depending on the changes of the first list with the model objects.
tia Martin