2012-12-21 27 views
0

当用户如果想在此情况下再次玩游戏时赢得游戏,则需要重新加载页面。 为此我已经尝试了下面的代码,但异常已到。什么是重新加载页面的正确方法。如何在Windows Phone 7应用程序中重新加载页面

NavigationService.Navigate(new Uri(string.Format("/NumericEasy.xaml"+ 
           "?Refresh=true&random={0}", Guid.NewGuid()))); 
+0

这看起来很好。抛出了什么异常?什么是堆栈跟踪? – ColinE

回答

1

我想,你得到这个异常:

导航只支持到相对URI是片段,或 以“/”开头,或含有“;组件/”

您应该设置UriKind参数。改变你的代码:

NavigationService.Navigate(new Uri(string.Format("/NumericEasy.xaml?random={0}", Guid.NewGuid()), UriKind.Relative)); 
相关问题