I have created a small test WPF .net Framework solution using Prism7 with Unity. In my only Module I have a View and a ViewModel. I'm not using the AutoWireViewModel property on the View. Instead I have a constructor on the View that takes my ViewModel as a parameter:
public partial class ViewA : UserControl
{
public ViewA(ViewAViewModel viewModel)
{
InitializeComponent();
DataContext = viewModel;
}
}
When I run the application this works, but I can't understand how. How is the ViewModel resolved without me having added it to the Unity Container? Is this some default Prism magic? If it is, is there a place where it is described?
Would be thankful for any insight.
ViewAinstance? - Haukinger