views:

209

answers:

2

This should be a very basic design question, but for some reason it doesn't seem to be well documented (maybe due to its simplicity?).

If I'm building a dashboard application in WPF that brig up different CRM tasks and I want to navigate between screens, is this the best way to do this, or is there a better way?

So for example I have Log In Screen -> Main Menu Screen -> Screen to one of different utilities

        var orderManagerWindow = new MyXamlView();
        var loginWindow = Application.Current.MainWindow;
        orderManagerWindow.Left = loginWindow.Left;
        orderManagerWindow.Top = loginWindow.Top;

        Application.Current.MainWindow = orderManagerWindow;
        orderManagerWindow.Show();
        loginWindow.Close();

I would really appreciate help and suggestions!

A: 

You can use a NavigationWindow or a Frame to display various "pages" (instances of Page or UserControl)

Thomas Levesque
Does ``NavigationWindow`` perform better than swapping for a different window? Is there a faster/smoother transition? Also, does that mean that existing windows need to be converted to pages? Thanks!
Greg R
I don't think there's a significant difference in performance, but the user experience will probably be better with a single window. If you go that way, yes, you will have to convert your Windows to Pages or UserControls
Thomas Levesque
Great, go it, thanks a lot!
Greg R
A: 

The ViewModel sample application of the WPF Application Framework (WAF) shows how a wizard can be implemented. A controller is responsible to navigate between the wizard pages. You might find it helpful.

jbe