tags:

views:

23

answers:

2

Sorry if this is a really dumb question!!!

I have two WPF Windows (page1 and page2).

there is a button on page1 which has an onclick event to do something. i then want it to open page2 .

There will also be a close button on page2 to close that window and reopen page1.

The only way i could see to do it was by opening a new window however this wont work as when i close the page2 i need page1 to be initialized again.

Hope you can help with this as it is driving me insane as this should be such a simple task.

A: 

Looks like you want a wizard with two pages. You can find a good WPF wizard sample here.

Frédéric Hamidi
A: 

Try changing your page1 and page2 windows to usercontrols and then host them in your main window. This way you can have them raise events for navigation and have the main window set their visibility and make changes as needed.

Mark Hall