我尝试加载我的Windows Phone 8应用程序导航到另一个页面时出错

时间:2014-08-07 17:00:53

标签: c#

每次运行它都会带我到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();
    }

1 个答案:

答案 0 :(得分:0)

确保您已正确提及目标网页。它应该是: /folder_name_if_used/page_name.xaml

示例:

NavigationService.Navigate(new Uri(" /NewPage.xaml",UriKind.Relative));

假设NewPage.xaml位于名为Views的文件夹中,那么它将是这样的: NavigationService.Navigate(新的Uri(" /Views/NewPage.xaml",UriKind.Relative));

有关详细信息,请查看此link

相关问题