当我试图加载我的windows phone 8应用程序导航到另一个页面时出错
本文关键字:另一个 导航 出错 应用程序 加载 我的 phone windows | 更新日期: 2023-09-27 18:17:11
每次运行App.xaml页面时,它都会将我带到该页面。然后显示下面的错误:
// Code to execute if a navigation fails
private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
{
if (Debugger.IsAttached)
{
// A navigation has failed; break into the debugger
Debugger.Break();
}
确保您正确地提到了目标页面的uri。它应该是:/folder_name_if_used/page_name.xaml
的例子:
NavigationService。(新Uri("/NewPage导航。xaml",UriKind.Relative);
假设是NewPage。xaml在一个名为Views的文件夹中,那么它将是这样的:NavigationService。导航(新的Uri("/视图/NewPage。xaml",UriKind.Relative);
更多信息请查看此链接