Skip to content

Instantly share code, notes, and snippets.

@ekwus
Created September 5, 2013 15:21
Show Gist options
  • Save ekwus/6451631 to your computer and use it in GitHub Desktop.
Save ekwus/6451631 to your computer and use it in GitHub Desktop.
The property on the MainViewModel should look like this
public ViewModelBase MyViewModel
{
get
{
return ServiceLocator.Current.GetInstance<SettingsViewModel>();
}
set
{
}
}
The XMAL should look like this....
<ContentControl Content="{Binding MyViewModel}" />
This should be in a Resource....
<DataTemplate DataType="{x:Type vm:ColdstoreViewModel}">
<v:ColdstoreView />
</DataTemplate>
@bhaidar
Copy link

bhaidar commented Dec 7, 2016

Hi,
I am trying to implement MahApps Flyout with MVVM, having multiple UserControls with multiple Flyouts. How could I specify the UserControl to show in the Left or Right Flyout? All I see is dealing with ViewModel and the "<v:ColdsotreView />". Does this assume you have only 1 UserControl for all Flyouts? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment