Quantcast
Channel: patterns & practices: Prism
Viewing all articles
Browse latest Browse all 1878

New Post: Login screen prior to Shell

$
0
0
Not sure I understand your concern.

It is very normal to register some shell level services in the Bootstrapper. Typically that is done by overriding ConfigureContainer, and after the call to the base method, add your calls to Container.Register there to register services. Then in the CreateShell override, you would construct the View, Resolve the ViewModel through the container so that it does the dependency injection for you, and then set the View's data context to the ViewModel to complete the MVVM wire up. Then wire up a completion handler for the login dialog (possibly an event raised by the ViewModel indicating successful completion of login, and in that handler construct the shell main window, show it, and set it as the Application.Current.MainWindow.

Hope that helps.
Brian

Viewing all articles
Browse latest Browse all 1878

Trending Articles