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