Created
September 5, 2013 15:21
-
-
Save ekwus/6451631 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The property on the MainViewModel should look like this | |
public ViewModelBase MyViewModel | |
{ | |
get | |
{ | |
return ServiceLocator.Current.GetInstance<SettingsViewModel>(); | |
} | |
set | |
{ | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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