I\'m creating a wpf user control which is in mvvm pattern. So we have : view(with no code in codebehind file), viewmodel,model,dataaccess files.
I have MainWindo
You can use a ContentControl, with a DataTemplate to bind the UserControl (View) to the ViewModel :
ContentControl
DataTemplate
UserControl
...
WPF will pick the DataTemplate automatically based on the type of the Content
Content