The MVVM Light toolkit has a ViewModelBase that all ViewModels inherit from. Unfortunately that ViewModelBase is built into the dll for MVVM Light, so I don’t know how to extend it.
I want to add the following code to the constructor of the ViewModelBase.
if (!App.IsAuthenticated) {
//MVVM Navigation code here
}
I have an IsAuthenticated flag set in my App.xaml.cs that’s set to true after a user successfully authenticates with our custom DB/authentication model (running OOB without a membership/role provider).
How do I extend the VMB to include this code?
you can get MVVM Light sourcecode from mvvmlight.codeplex.com and modify it.