简体   繁体   English

在Windows Phone 8.1(C#)中刷新页面或导航到同一页面

[英]Refresh a page or navigate to same page in windows phone 8.1 (c#)

I searched but I always find a way for windows phone 8 that doesn't work for windows phone 8.1. 我进行了搜索,但我始终找到Windows Phone 8的方法,不适用于Windows Phone 8.1。
I want to refresh a page or navigate to same page in windows phone 8.1. 我想刷新页面或导航到Windows Phone 8.1中的同一页面。
I Want to do this on windows phone 8.1 . 我想在Windows Phone 8.1上执行此操作。
Please help me. 请帮我。
Thanks. 谢谢。

I Just change mode of NavigationCacheMode. 我只是更改NavigationCacheMode的模式。

NavigationCacheMode = NavigationCacheMode.Disabled;

With this code, I disable cache. 使用此代码,我禁用了缓存。
Thanks everyone. 感谢大家。

your first page is already loaded. 您的第一页已经加载。 all you need to do is to GoBack. 您需要做的就是GoBack。 In your second page where you want to go to first page use this code. 在您要转到第一页的第二页中,使用此代码。

   if (this.Frame.CanGoBack)
                this.Frame.GoBack();

Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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