Splash and login screen

Apr 26, 2012 at 9:06 AM

First of all, I am just starting using Simple MVVM toolkit, so I am new to this technology. I tried MVVM Light first, but found Simple MVVM toolkit more documented and this made a great difference.

As I said being new to this technology, I have an issue (the first of many, no doubt). I am currently working on a new app using the MVVM pattern with WPF.

When the application loads, I need to recover some hardware info, which takes a bit of time. I decided to create a splash screen, which change as a login screen to authentify the user.

My first thought was to override the OnStartup method in the App.xaml.cs. Tle splash/login screen is created, as a Splash.DialogShow(). But what ever the DialogResult returned by the screen is, the application closes, and I never get to the MainWindow.

This is not apparently the best way to go.

So could someone point me out how to achieve this? All I need, is a splash screen to do all the hardware retrieval info, then may be, start the app with a LoginView which then send the user to the MainView depending of the login result.

I am sure, it is pretty simple to achieve, but coming from a winforms background, I still think a bit too much that way.

Thank you for your help.

PS : sorry for my poor English, but I am French...

Apr 26, 2012 at 8:24 PM

For a starter, you might want to try following these steps: http://msdn.microsoft.com/en-us/library/cc656886.aspx

The difference, is that you would use a View with a ViewModel (without a service agent).  Have you gone through the Getting Started tutorial?

Apr 26, 2012 at 8:38 PM

Thank you for your answer. I will try it.

Yes, I did the getting started tutorial, and it was very helpfull to understand the framework. I will try the other tutorial, and will start with my development. Thank you for your help.