&则须─GT; passwordscreen-> password.xaml
&则须─GT; homepage.xaml
我使用
从主页导航到password.xaml页面NavigationService.Navigate(new Uri("/views/passwordscreen/password.xaml", UriKind.Relative));
但是我无法从密码导航到主页,我尝试了几种方法,我该怎么做?
NavigationService.Navigate(new Uri("/views/homepage.xaml", UriKind.Relative)); //doesn't work
NavigationService.Navigate(new Uri("/homepage.xaml", UriKind.Relative)); //doesn't work
异常:System.InvalidOperationException:在/homepage.xaml
位置找不到XAML答案 0 :(得分:1)
我没有看到任何问题,请仔细检查您的文件夹路径和文件名,
NavigationService.Navigate(new Uri("/views/homepage.xaml", UriKind.Relative));
无论如何,你可以这样做,因为你想回到同一页面,
function void GoBack()
{
if (this.NavigationService.CanGoBack)
{
this.NavigationService.GoBack();
}
}