<tfoot id='sA3Er'></tfoot>

  1. <i id='sA3Er'><tr id='sA3Er'><dt id='sA3Er'><q id='sA3Er'><span id='sA3Er'><b id='sA3Er'><form id='sA3Er'><ins id='sA3Er'></ins><ul id='sA3Er'></ul><sub id='sA3Er'></sub></form><legend id='sA3Er'></legend><bdo id='sA3Er'><pre id='sA3Er'><center id='sA3Er'></center></pre></bdo></b><th id='sA3Er'></th></span></q></dt></tr></i><div id='sA3Er'><tfoot id='sA3Er'></tfoot><dl id='sA3Er'><fieldset id='sA3Er'></fieldset></dl></div>
      <bdo id='sA3Er'></bdo><ul id='sA3Er'></ul>

    1. <small id='sA3Er'></small><noframes id='sA3Er'>

      <legend id='sA3Er'><style id='sA3Er'><dir id='sA3Er'><q id='sA3Er'></q></dir></style></legend>

      如何以 xamarin 形式将一个内容页面从客户端项目

      时间:2023-08-28

            <tbody id='RjP4N'></tbody>

        1. <small id='RjP4N'></small><noframes id='RjP4N'>

        2. <i id='RjP4N'><tr id='RjP4N'><dt id='RjP4N'><q id='RjP4N'><span id='RjP4N'><b id='RjP4N'><form id='RjP4N'><ins id='RjP4N'></ins><ul id='RjP4N'></ul><sub id='RjP4N'></sub></form><legend id='RjP4N'></legend><bdo id='RjP4N'><pre id='RjP4N'><center id='RjP4N'></center></pre></bdo></b><th id='RjP4N'></th></span></q></dt></tr></i><div id='RjP4N'><tfoot id='RjP4N'></tfoot><dl id='RjP4N'><fieldset id='RjP4N'></fieldset></dl></div>
            <legend id='RjP4N'><style id='RjP4N'><dir id='RjP4N'><q id='RjP4N'></q></dir></style></legend>
            • <tfoot id='RjP4N'></tfoot>
                <bdo id='RjP4N'></bdo><ul id='RjP4N'></ul>
              • 本文介绍了如何以 xamarin 形式将一个内容页面从客户端项目(IOS/Android)导航到另一个内容页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                如何在 xamarin 表单中将一个内容页面从客户端项目导航到另一个内容页面?

                How to navigate one content page to another content page from client project in xamarin forms?

                我已经以不同的方式在每个平台上实现了推送通知.我需要从当前内容页面导航到另一个内容.

                I have done implementing push notification in each platform in different way. I need to navigate to another content from current content page.

                我尝试在 GCMService 的 OnMessage 方法中使用以下代码.我的问题是第二个导航内容页面的构造函数被调用并成功调试.但是我的屏幕仍然显示当前页面而不显示第二个导航内容页面.

                i try to use below code in GCMService's OnMessage method. My Problem is Second navigation content page's constructor are called and debug successfully. but my screen still display current page not to display second navigation content page.

                App.Current.MainPage.Navigation.PushAsync (new SecondNavigationContentPage());
                

                推荐答案

                主页"必须是导航页面才能使用推送弹出导航进行导航.你有几个选择.

                "Main Page" has to be a navigation page in order to navigate with the push pop navigation. You have a couple of options.

                选项 1:

                用您的新页面替换 MainPage 并使用内容页面.

                Swap out MainPage with your new page and use content pages.

                App.Current.MainPage = your new content page
                

                选项2:(可能是更好的选择)

                Option 2: (Probably the better option)

                使 App.Current.MainPage 成为 NavigationPage 而不是 ContentPage,然后将您的第一个内容页面推送到它.当您需要转到第二个内容页面时,请使用推送导航架构.

                Make App.Current.MainPage a NavigationPage rather than a ContentPage then push your first content page to it. When you need to go to the second content page use the push navigation architecture.

                App.Current.MainPage = new NavigationPage;
                App.Current.MainPage.Navigation.PushAsync(Page1);
                App.Current.MainPage.Navigation.PushAsync(Page2);
                

                文档:http://developer.xamarin.com/guides/cross-platform/xamarin-forms/controls/pages/

                更新

                请注意,由于这个答案已经出现了更好的导航方式,例如 docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/... app shell routing.

                Note that since this answer much better ways have come along for navigation such as docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/… app shell routing.

                其他选择是 Prism MVVM 或您自己的视图模型定位器 prismlibrary.com/docs/viewmodel-locator.html.使用这种内置导航的缺点是它缺少视图模型来查看模型导航,并且依赖于页面到页面,这会导致不必要的视图耦合以及简单笨拙的导航.

                Other choices are Prism MVVM or your own view model locator prismlibrary.com/docs/viewmodel-locator.html. The short coming in using this built in navigation is it lacks view model to view model navigation and depends on page to page which causes unwanted coupling of views and just plain clunky navigation.

                这篇关于如何以 xamarin 形式将一个内容页面从客户端项目(IOS/Android)导航到另一个内容页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:MasterPage 是否知道正在显示的页面? 下一篇:ASP.NET 异常:无法解析远程名称:“apiconnector.com&q

                相关文章

                最新文章

                <i id='d7XKM'><tr id='d7XKM'><dt id='d7XKM'><q id='d7XKM'><span id='d7XKM'><b id='d7XKM'><form id='d7XKM'><ins id='d7XKM'></ins><ul id='d7XKM'></ul><sub id='d7XKM'></sub></form><legend id='d7XKM'></legend><bdo id='d7XKM'><pre id='d7XKM'><center id='d7XKM'></center></pre></bdo></b><th id='d7XKM'></th></span></q></dt></tr></i><div id='d7XKM'><tfoot id='d7XKM'></tfoot><dl id='d7XKM'><fieldset id='d7XKM'></fieldset></dl></div>

                  <legend id='d7XKM'><style id='d7XKM'><dir id='d7XKM'><q id='d7XKM'></q></dir></style></legend>

                1. <tfoot id='d7XKM'></tfoot>

                      <bdo id='d7XKM'></bdo><ul id='d7XKM'></ul>
                  1. <small id='d7XKM'></small><noframes id='d7XKM'>