In xaml, is it bad to use a frame inside a window to display pages?

I'm just wondering what is the usual practice of having pages (I don't mean pages like on XAML pages, I just mean ... different screens) that can be moved between?

Right now I use only a bunch of pages and use the NavigationService class in C # to move between my pages. But I just opened Frames.

It is better to have a frame inside the window:

<window> <frame source="page.xaml" /> </window> 

or just do it with all pages and navigation services? Or should I use a window inside a frame?

What are you doing?

Thanks!

+4
source share
1 answer

Frames are commonly used when creating a navigation-based application in WPF. However, there’s a lot to learn about the WPF navigation system and a few things you need to know about the page life cycle, etc., to avoid memory leaks and unexpected behavior.

This is a great overview of Paul Stovell: http://www.paulstovell.com/wpf-navigation

+10
source

All Articles