2014-03-26 61 views
1
网页间导航

,则须─> passwordscreen-> password.xaml的Windows Phone在不同的文件夹

,则须─> homepage.xaml

我从网页浏览到使用

NavigationService.Navigate(new Uri("/views/passwordscreen/password.xaml", UriKind.Relative)); 
的password.xaml页

但是我不能从密码导航到主页,我尝试了几种方法,我该怎么做?

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:没有XAML在该位置找到/homepage.xaml

+0

任何异常?? – Jaihind

+0

什么主页位置是? – Ku6opr

+0

主页位置是/ views/homepage,但我尝试过,它给出了相同的错误,即时尝试导航到密码画面文件夹,我该怎么做? – Bohrend

回答

1

我没有看到任何这方面的问题,仔细检查您的文件夹路径和文件名,

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

反正你可以因为你要回到同一页为此,

function void GoBack() 
    { 
    if (this.NavigationService.CanGoBack) 
    { 
     this.NavigationService.GoBack(); 
    } 
    } 
相关问题