views:

135

answers:

1

Is there any difference between calling frame.Navigate and setting frame.Source = new MyPage()? Is one of them more efficient when it comes to memory usage, and is the frame's journal (back, forward buttons) affected differently when using a particular method?

+1  A: 

Yes, there's a difference. What you navigate to is journaled. This means that if you navigate to a Page, the entire Page is kept alive in the journal for as long as it would remain in navigation history. It's better, memory wise, to navigate to a Uri. Be aware that the navigation system and journaling in WPF is quite complex, and often at odds with lifetime management. There be dragons here. Learn as much about this subject as you can, before choosing to use the built-in navigation system.

wekempf