I am migrating/rewriting a SL4 project using the MVVM pattern. The trouble I’m having is that I have some user controls that interact only with other user controls(no connection to the Model). Where to I implement the code behind functions for this controls?
I am migrating/rewriting a SL4 project using the MVVM pattern. The trouble I’m having
Share
There are several options. If the controls have a natural hierarchy (such as one is the other’s parent) consider wrapping them into a user control and leveraging RoutedEvents.
If they are sibling controls and there is a natural parent for them, group them into a parental user control and create a viewmodel for that control that handles interaction.
If the controls are in totally separate areas on the UI, consider using EventAggregator to have the controls fire and respond to each others messages.