感谢您的回放。我研究了引入“场所”的概念,但坦率地说,我不明白这一点。我对windows phone7开发还是个新手。我会解释我的前辈是如何,在我的应用程序中,我有EULA页面,这是强制性的,由用户接受使用的应用程序。在用户接受EULA之后,页面被导航到PhoneNumber.xaml页面,这里的帖子与电话号码一起被发送到门户网站,现在页面被导航到MainPage.xaml。如果用户是注册用户,则不显示EULA屏幕,只需将MainPage.xaml作为应用程序的第一页。现在,像这样使用UriMapper,
<Application.Resources>
<UriMapper:UriMapper x:Name="mapper">
<UriMapper:UriMapping Uri="/MainPage.xaml"/>
</UriMapper:UriMapper>
</Application.Resources>
private void SetupUriMapper()
{
// Get the UriMapper from the app.xaml resources, and assign it to the root frame
UriMapper mapper = Resources["mapper"] as UriMapper;
RootFrame.UriMapper = mapper;
// Our dummy check -- does the current time have an odd or even number of seconds?
DateTime time = DateTime.Now;
int seconds = time.Second;
bool isOdd = (seconds % 2) == 1;
// Update the mapper as appropriate
if (isOdd)
mapper.UriMappings[0].MappedUri = new Uri("/MainPage.xaml", UriKind.Relative);
else
mapper.UriMappings[0].MappedUri = new Uri("/EULA.xaml", UriKind.Relative);
}只是为了测试,它被设置为DataTime。这里的问题是,当涉及到EULA.xaml时,它导航到PhoneNumber.xaml,然后导航到EULA.xaml,而不是从那里导航到MainPage.xaml。所以这就是问题所在。我们不应该使用EULA弹出窗口,它应该是一个页面。提前感谢您的帮助。
问候你,帕纳奇。
发布于 2010-12-17 02:12:55
更改为<UriMapper:UriMapping Uri="/MainOrEULAPage.xaml"/>
并将WMAppManifest.xml更改为<DefaultTask Name ="_default" NavigationPage="MainOrEULAPage.xaml"/>
https://stackoverflow.com/questions/4463085
复制相似问题