首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何浏览EULA和MainPage?

如何浏览EULA和MainPage?
EN

Stack Overflow用户
提问于 2010-12-17 00:36:43
回答 1查看 313关注 0票数 0

感谢您的回放。我研究了引入“场所”的概念,但坦率地说,我不明白这一点。我对windows phone7开发还是个新手。我会解释我的前辈是如何,在我的应用程序中,我有EULA页面,这是强制性的,由用户接受使用的应用程序。在用户接受EULA之后,页面被导航到PhoneNumber.xaml页面,这里的帖子与电话号码一起被发送到门户网站,现在页面被导航到MainPage.xaml。如果用户是注册用户,则不显示EULA屏幕,只需将MainPage.xaml作为应用程序的第一页。现在,像这样使用UriMapper,

代码语言:javascript
复制
<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弹出窗口,它应该是一个页面。提前感谢您的帮助。

问候你,帕纳奇。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2010-12-17 02:12:55

更改为<UriMapper:UriMapping Uri="/MainOrEULAPage.xaml"/>

并将WMAppManifest.xml更改为<DefaultTask Name ="_default" NavigationPage="MainOrEULAPage.xaml"/>

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/4463085

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档