tags:

views:

231

answers:

1

When creating a Navigation Application in WPF, How can I create a custom style and layout for the window? Is this possible? Say for instance, adding a panel along the side of the window with links to all the pages in the application. When I try add controls/content to the NavigationWindow, I get the following message:

"The type 'NavigationWindow' does not support direct content."

Thanks

A: 

To customize the host window in a navigation-style app, just make yourself a normal WPF application, with a normal Window, and drop a Frame control into that window. Set the Frame's Source to the page you want the app to start with and it'll behave just like your standard navigation app, except you'll have the ability to customize the window with other controls etc.

Matt Hamilton
Thanks. When I create a navigation window, there's back forward and history controls. Can I still get this functionality with the solution you've described?
Bruce Adams
Sure - the Frame control has them by default. You need to set the ShowsNavigationUI property to false for them *not* to show.
Matt Hamilton