<
Assembly: DefineViewViewModel(GetType(MainWindow), GetType(ShellVM))><
Assembly: DefineViewViewModel(GetType(SplashView), GetType(ShellVM))><
Assembly: DefineViewViewModel(GetType(LoginView), GetType(ShellVM))><
Assembly: DefineViewViewModel(GetType(AdminRootView), GetType(AdminRootVM))>'Associate urls with Views
<
Assembly: DefineNavigationContent("Pages/Splash/", GetType(SplashView))><
Assembly: DefineNavigationContent("Pages/Login/", GetType(LoginView))><
Assembly: DefineNavigationContent("Pages/AdminRoot/", GetType(AdminRootView))>In Application.xaml I define MainWindow as starting point:
xmlns
:n="http://nRoute/schemas/2010/xaml" StartupUri="MainWindow.xaml"> <!-- BOOTSTRAPPING --> <n:Application.ApplicationLifetimeObjects> <n:nRouteApplicationService>........
And in the VM I override OnInitialize, but never ends there .....
..... ShellVM ....
#Region
"Constructor(s)" Public Sub New()myInstanceId =
Guid.NewGuid Debug.Print("ShellVM " & myInstanceId.ToString & " -- New") End Sub#End
Region Protected Overrides Sub OnIntialize(state As nRoute.Components.ParametersCollection) MyBase.OnIntialize(state) Debug.Print("ShellVM " & myInstanceId.ToString & " -- OnInitialize") End Sub
I get the line from 'New', but never from 'OnInitialize', but the MainWindow cames up and shows the SplashView.
By the way, is there a recommended pattern to implement a splash screen, which is up during application composition (MEF ...) and than the switches over automatically to a login view, using NavigationService.Navigate( ....) ?
With best regards
Gerhard