tags:

views:

3182

answers:

2

I have a Window where I have put a Frame. I would like to add a Page to the Frame when I click a button that is also on the Window but not in the Frame. There are several buttons in the Window and each click on a button should load a different Page in the Frame.

Since I'm a total newbie on this WPF stuff it's quite possible that this approach is not the best and I have thought about replacing the Frame with a Canvas and then make UserControls instead of Pages that will be added to the Canvas. I welcome any ideas and suggestions on how to best solve this.

I aiming for a functionality that is similar to the application Billy Hollis demonstrated in dnrtv episode 115. (http://dnrtv.com/default.aspx?showID=115).

+2  A: 

hi there,

the Frame class exposes a method named "Navigate" that takes the content you want to show in your frame as parameter. try calling

myFrame.Navigate(myPageObject);

this should work

Joachim Kerschbaumer
A: 

I think this would not solve the problem as when you need to have two frames and would load to have two pages at the same time. Kindly clarify.

siva