In my MVVM application, I am trying to create a reusable user control that's been shared between multiple applications, here's the constructor
public MyUserControl(IMyViewModel viewModel)
{
InitializeComponent();
DataContext = viewModel;
}
So my plan is that each application will just feed it's own viewmodel to the shared view.
Now the questions is how to pass viewmodel object from XAML code to the constructor:
<my:MyUserControl "somehow pass a viewmodel object from here">
Thank you