简体   繁体   中英

Navigation between pages in WP8.1

I'm trying to migrate my app from WP8 to WP8.1. And I don't get how to navigate to already opened page with another parameters.

For example, I'm showing user info on UserPage giving it user's id as parameter. And when page is already is the content of the Frame I want to open UserPage again but for other user giving it another id.

My problem is that, using NavigationCacheMode set to Required for UserPage means that there will be no navigation with other parameters. But when NavigationCacheMode is set to Disabled navigation with another parameter is success but when I press back button old instance of UserPage is using data from new one.

In WP8 passing new parameters was enough to create new instance of a page with it's own cache. How to do similar in WP8.1 using WRT APIs?

Thanks to Romansz for the tip about using UserControl. Using UserControl binding to a ContentControl and handling BackKeyPress solves my problem with navigation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM