久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

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

        <bdo id='Y7AzF'></bdo><ul id='Y7AzF'></ul>

      <small id='Y7AzF'></small><noframes id='Y7AzF'>

        <legend id='Y7AzF'><style id='Y7AzF'><dir id='Y7AzF'><q id='Y7AzF'></q></dir></style></legend>
        <tfoot id='Y7AzF'></tfoot>
      1. 在 WP7 Silverlight 應用程序中導航時將復雜對象傳遞

        Passing a complex object to a page while navigating in a WP7 Silverlight application(在 WP7 Silverlight 應用程序中導航時將復雜對象傳遞到頁面)
          <bdo id='ddfao'></bdo><ul id='ddfao'></ul>

              <small id='ddfao'></small><noframes id='ddfao'>

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

                <legend id='ddfao'><style id='ddfao'><dir id='ddfao'><q id='ddfao'></q></dir></style></legend>
                • 本文介紹了在 WP7 Silverlight 應用程序中導航時將復雜對象傳遞到頁面的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我一直在使用 NavigationServiceNavigate 方法導航到我的 WP7 Silverlight 應用程序中的其他頁面:

                  I have been using the NavigationService's Navigate method to navigate to other pages in my WP7 Silverlight app:

                  NavigationService.Navigate(new Uri("/Somepage.xaml?val=dreas", UriKind.Relative));
                  

                  Somepage.xaml,然后我檢索查詢字符串參數如下:

                  From Somepage.xaml, I then retrieve the query string parameters as follows:

                  string val;
                  NavigationContext.QueryString.TryGetValue("val", out val);
                  

                  <小時>

                  我現在需要一種使用類似方式傳遞復雜對象的方法.每次我需要將對象傳遞到新頁面時,如何不必序列化對象?


                  I now need a way to pass a complex object using a similar manner. How can I do this without having to serialize the object every time I need to pass it to a new page?

                  推薦答案

                  這是一個極其復雜的問題,這里沒有簡單的解決方案.沒有任何神奇的 API 可以適用于任何應用來解決這個問題.

                  This is an extremely complex problem, and there is no simple solution here. There is no magic API that would just work for any app to solve this problem.

                  傳遞導航數據的核心問題是墓碑.默認情況下唯一被墓碑化的數據是導航 URI.因此,如果您使用的是 QueryString 參數,它將被墓碑和您的代碼自動拾取.但是,任何時候您手動傳遞對象的實例時,您都必須自己手動為該實例執行墓碑.

                  The core problem with passing navigation data is Tombstoning. The only piece of data that is tombstoned by default is the Navigation URI. so if you're using a QueryString parameter, it'll get picked up automatically by tombstoning and your code. Any time you'll manually pass a instance of an object though, you'll have to manually do tombstoning for that instance yourself.

                  因此,如果您導航到/CowDetails.xaml?ID=1",您的頁面可能只需選擇 ID Querystring 參數即可擁有完美的墓碑.但是,如果您以某種方式為 CowDetails 頁面提供new Cow() { ID = 1}",則必須確保自己墓碑化并僵尸化此值.

                  So, if you navigate to "/CowDetails.xaml?ID=1" your page will probably have perfect tombstoning just by picking up on the ID Querystring Parameter. However, if you somehow provide CowDetails page with a "new Cow() { ID = 1}" you'll have to make sure to tombstone and zombificate this value yourself.

                  還有時間問題.在調用 NavigationService.Navigate 時,您正在導航的頁面還沒有實際實例.因此,即使您正在導航到 FooPage 并準備好 FooData,也無法立即將 FooPage 連接到 FooData.您必須等到 PhoneApplicationFrame.Navigated 事件觸發后才能為 FooPage 提供 FooData.

                  Also, there's the issue of timing. While calling NavigationService.Navigate, the page you're navigating too doesn't have an actual instance yet. So even though you're navigating to FooPage and have the FooData ready, there's no way to immediately connect FooPage to FooData. You'll have to wait until the PhoneApplicationFrame.Navigated event has fired in order to provide FooPage with FooData.

                  我通常處理這個問題的方式是:

                  The way I normally deal with this is problem:

                  1. 擁有一個帶有 Object 類型 Data 屬性的 BasePage
                  2. 讓 NavigationHelper 獲取頁面 URI 和數據:NavigationHelper.Navigate("foo.xaml", fooData)
                  3. 讓 NavigationHelper 注冊到 PhoneApplicationFrame.Navigated 事件,如果它是foo.xaml",則將 BasePage.Data 設置為 FooData.
                  4. 讓 BasePage 使用 JSON.Net 墓碑和僵尸化 BasePage.Data.
                  5. 在 BasePage 上,我有一個 OnDataSet 虛擬方法,一旦通過 Zombification 或 Navigation 填充 Data 屬性,就會調用該方法.在這種方法中,與業務數據有關的一切都會發生.

                  這篇關于在 WP7 Silverlight 應用程序中導航時將復雜對象傳遞到頁面的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Ignore whitespace while reading XML(讀取 XML 時忽略空格)
                  XML to LINQ with Checking Null Elements(帶有檢查空元素的 XML 到 LINQ)
                  Reading XML with unclosed tags in C#(在 C# 中讀取帶有未閉合標簽的 XML)
                  Parsing tables, cells with Html agility in C#(在 C# 中使用 Html 敏捷性解析表格、單元格)
                  delete element from xml using LINQ(使用 LINQ 從 xml 中刪除元素)
                  Parse malformed XML(解析格式錯誤的 XML)
                  • <bdo id='Opm0P'></bdo><ul id='Opm0P'></ul>

                          • <small id='Opm0P'></small><noframes id='Opm0P'>

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

                            <tfoot id='Opm0P'></tfoot><legend id='Opm0P'><style id='Opm0P'><dir id='Opm0P'><q id='Opm0P'></q></dir></style></legend>
                          • 主站蜘蛛池模板: 三级在线观看 | 一区二区视频在线 | 中文字幕不卡在线88 | 亚洲欧美男人天堂 | 91视在线国内在线播放酒店 | 欧美夜夜| 欧美精品在线播放 | 久久一二 | 欧美一区二区精品 | 国产精品99久久久久久宅男 | 欧美一区二区 | 一a级片| 日韩精品中文字幕在线 | 国产精品视频导航 | 最新日韩av | 日日操网站| 91精品久久久 | 久久婷婷av | 日本电影一区二区 | 久草色视频 | 日韩一级免费大片 | 黄色永久免费 | 久久国产精品免费视频 | av影音在线| 91视频大全 | 在线视频成人 | 黄a在线观看 | www免费视频 | 日韩av在线一区二区三区 | 国产精品免费一区二区三区 | 精品国产高清一区二区三区 | 丁香综合 | 毛片国产 | 操操日| 日韩欧美在线观看 | 毛片免费视频 | 久久久久久毛片免费观看 | 精品成人在线 | 亚洲国产aⅴ成人精品无吗 综合国产在线 | 中文字幕乱码视频32 | 国产99久久精品一区二区永久免费 |