views:

39

answers:

2

I have designed 5 windows and all of them are having tab controls. Is there a better way or other ways to navigate between them ?

I am now doing it like

window1 w = new Window1(); 
w.Show();
this.Close();

also I am serializing an ApplicationContext class to an xml file which I have created to store all of the information of the application. It will store many object collections inside and each time I navigate to other window I am forwarding the ApplicationContext class to other window.

I am quite new to Windows Presentation Foundation and I can't be sure if this is the correct or/and efficient way to do this.

Any tutorials, e-book advises are appreciated,

+1  A: 

You shoul read Matthew MacDonald book Pro WPF in C# 2008: Windows Presentation Foundation with .NET 3.5, Second Edition. Actually Chapter 3 and Chapter 4 to understand WPF Application Model and Window Interaction Model.

ApplicationContext may be stored in your Application Class which will know about all of your windows and pass ApplicationContext to any window you want to show.

UPD

There is also "Pro WPF in C# 2010" (author is the same) but it is strange that it isn't listed at APress website.

Eugene Cheverda
I guess I have that book. Thank you.
Kubi
+1  A: 

You might have a look at the ViewModel sample application of the WPF Application Framework (WAF). It shows how to navigate between UserControls inside a Wizard. It's not exactly the same as you described but maybe it helps.

jbe