久久久久久久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 應(yīng)用程序中導(dǎo)航時將復(fù)雜對象傳遞

        Passing a complex object to a page while navigating in a WP7 Silverlight application(在 WP7 Silverlight 應(yīng)用程序中導(dǎo)航時將復(fù)雜對象傳遞到頁面)
          <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 應(yīng)用程序中導(dǎo)航時將復(fù)雜對象傳遞到頁面的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  我一直在使用 NavigationServiceNavigate 方法導(dǎo)航到我的 WP7 Silverlight 應(yīng)用程序中的其他頁面:

                  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,然后我檢索查詢字符串參數(shù)如下:

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

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

                  <小時>

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


                  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?

                  推薦答案

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

                  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.

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

                  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.

                  因此,如果您導(dǎo)航到/CowDetails.xaml?ID=1",您的頁面可能只需選擇 ID Querystring 參數(shù)即可擁有完美的墓碑.但是,如果您以某種方式為 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.

                  還有時間問題.在調(diào)用 NavigationService.Navigate 時,您正在導(dǎo)航的頁面還沒有實際實例.因此,即使您正在導(dǎo)航到 FooPage 并準(zhǔn)備好 FooData,也無法立即將 FooPage 連接到 FooData.您必須等到 PhoneApplicationFrame.Navigated 事件觸發(fā)后才能為 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 和數(shù)據(jù):NavigationHelper.Navigate("foo.xaml", fooData)
                  3. 讓 NavigationHelper 注冊到 PhoneApplicationFrame.Navigated 事件,如果它是foo.xaml",則將 BasePage.Data 設(shè)置為 FooData.
                  4. 讓 BasePage 使用 JSON.Net 墓碑和僵尸化 BasePage.Data.
                  5. 在 BasePage 上,我有一個 OnDataSet 虛擬方法,一旦通過 Zombification 或 Navigation 填充 Data 屬性,就會調(diào)用該方法.在這種方法中,與業(yè)務(wù)數(shù)據(jù)有關(guān)的一切都會發(fā)生.

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

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

                  相關(guān)文檔推薦

                  Ignore whitespace while reading XML(讀取 XML 時忽略空格)
                  XML to LINQ with Checking Null Elements(帶有檢查空元素的 XML 到 LINQ)
                  Reading XML with unclosed tags in C#(在 C# 中讀取帶有未閉合標(biāo)簽的 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>
                          • 主站蜘蛛池模板: 欧美日韩在线一区二区三区 | 亚洲一区二区三区视频 | 欧美性精品 | 99视频在线播放 | 日韩精品一区二区三区久久 | 国产精品福利视频 | 精品国产一区二区三区四区在线 | 伊人色综合久久久天天蜜桃 | 国产精品久久久久久久久久了 | 亚洲一区二区久久 | 欧美激情在线精品一区二区三区 | 欧美一区二区三区在线观看 | 操人网| 亚洲一区二区av在线 | 亚洲综合一区二区三区 | 一本久久a久久精品亚洲 | 亚洲在线一区 | 亚洲视频www | 韩日中文字幕 | 欧美一区二区免费 | 欧美日韩高清在线一区 | 欧美xxxx性xxxxx高清 | 精品久久久久久久久久久 | 国产成人av一区二区三区 | 日本公妇乱淫xxxⅹ 国产在线不卡 | 成人一级黄色毛片 | 九九综合九九 | 久久视频精品 | 精品欧美乱码久久久久久1区2区 | 美女逼网站 | 欧美成人a∨高清免费观看 色999日韩 | 国产精品久久久久久久毛片 | 国产欧美精品一区二区三区 | av天天看| 51ⅴ精品国产91久久久久久 | 少妇久久久 | 欧美性网| 性做久久久久久免费观看欧美 | 欧美在线视频网 | 欧美一区二区三区久久精品视 | 亚洲精品久久久久久国产精华液 |