user1281991
user1281991

Reputation: 773

WPF multipage application - how to navigate?

I have a window (mainwindow) where I want a top header to be static. (The same content). The content underneath is dynamic and could be pages or usercontrols.

I think that I could have a Frame or a ContentControl for this purpose. So far so good. I run into trouble if I want the "Next" buttons (to shift the another page/usercontrol) to be inside of the pages or usercontrols - and not part of the mainwindow.

If so I can't reach my Frame or ContentControl. (Let's say my ContenControl have the name="MainContent". I then can't do MainContent.Content(new AnotherPage()); - cause I can't reach the MainContent)

It's properly a matter of correct inheritance, but I can't figure it out.

Any help?

Upvotes: 0

Views: 355

Answers (1)

user1281991
user1281991

Reputation: 773

Got it :)

this.Content = new Anotherpage();

The keyword for me here was "this"

Upvotes: 0

Related Questions