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

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

  1. <tfoot id='jTEVu'></tfoot>
  2. <legend id='jTEVu'><style id='jTEVu'><dir id='jTEVu'><q id='jTEVu'></q></dir></style></legend>
      • <bdo id='jTEVu'></bdo><ul id='jTEVu'></ul>

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

      為 Windows Phone 8.1 在頁面之間傳遞數據

      Passing Data from Page to Page for Windows Phone 8.1(為 Windows Phone 8.1 在頁面之間傳遞數據)

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

            <tfoot id='QmKPK'></tfoot>

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

            1. <legend id='QmKPK'><style id='QmKPK'><dir id='QmKPK'><q id='QmKPK'></q></dir></style></legend>

              • <bdo id='QmKPK'></bdo><ul id='QmKPK'></ul>

                  <tbody id='QmKPK'></tbody>
                本文介紹了為 Windows Phone 8.1 在頁面之間傳遞數據的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我的問題與在頁面之間傳遞數據有完全相同的問題,但僅適用于 Windows Phone 8.1(相對于 Windows Phone 7).問題來了:

                I have the exact same question as Passing data from page to page, but only for Windows Phone 8.1 (opposed to Windows Phone 7). Here is the question:

                我正在尋找有關如何在頁面之間傳遞數據的最佳實踐.

                I'm looking for the best practice on how to pass data from page to page.

                在頁面 A 中,我有一個觸發頁面 B 的按鈕.在頁面 B 我有 6 個文本框,允許用戶輸入信息.當用戶完成后,點擊一個按鈕將他們帶回頁面 A.

                In Page A I have a button that fires off Page B. On Page B I have 6 textboxes that allow the user to enter information. When the user is done, the click on a button that brings them back to Page A.

                我想將該數據傳遞回頁面 A.

                I want to pass that data back to Page A.

                我看到了以下建議:

                構建 XML 文檔并保存到獨立存儲使用 App 類在屬性中存儲信息像查詢字符串一樣傳遞它我正在尋找最佳實踐.有沒有一種是 Microsoft 推薦的,或者是公認的最佳方法?

                build XML documents and save to Isolated Storage use the App class to store information in properties pass it like a query string I'm looking for the Best practice. Is there one that Microsoft recommends or one that is generally accepted as the best way?

                謝謝

                推薦答案

                在 WP8.1 運行時 - 對于 Silverlight,WP8.0 中使用的方法 應該仍然有效 - 您有兩個選擇:

                In WP8.1 Runtime - for Silverlight, the methods used in WP8.0 still should work - you have couple of choces:

                • 第一種可能也是最簡單的方法是使用 使用參數導航 - 如果它是可序列化類型,則不必將其轉換為 string:

                • the first and probably the easiest way is to use Navigate with parameter - you don't have to convert it to string if it's a serializable type:

                // let's assume that you have a simple class:
                public class PassedData
                {
                   public string Name { get; set; }
                   public int Value { get; set; }
                }
                
                // then you navigate like this:
                Frame.Navigate(typeof(Page1), new PassedData { Name = "my name", Value = 10 });
                
                // and in target Page you retrive the information:
                protected override void OnNavigatedTo(NavigationEventArgs e)
                {
                    PassedData data = e.Parameter as PassedData;
                }
                

              • 您可以使用一些靜態對象在應用程序中傳遞您的數據

              • you can use some static objects to pass your data along the App

                請注意,您還必須處理應用程序暫停/恢復 - 因此在應用程序暫停時保存您的數據并在應用程序恢復時加載是合適的.您應該記住,當應用程序恢復時,OnNavigatedTo 不會被調用.

                Note that you will also have to handle app suspending/resuming - so it will be suitable to save your data when the app is being suspended and load when it's resumed. You should remember that OnNavigatedTo is not being called when the app is resuming.

                以上是關于正常導航(前進).如果你想在上一個頁面中填充一些數據,那么你有幾個選擇:

                The above was about normal navigation (forward). If you want to fill some data in previous Page, then you have a couple of options:

                • 將處理程序傳遞給前一個頁面,以便您可以從當前頁面訪問公共變量/屬性,
                • 使用靜態變量/屬性 - 可能是單例
                • 再次使用文件/設置

                請注意,前兩種方法也有一個缺點,即應用程序在暫停后可能會崩潰.在這里保存到文件可能會更好,認為需要更多的工作和適當的處理.

                Note that again the first two methods has a disadvantage that the app may crash after being suspended. Saving to files might be better here, thought needs some more work and proper handling.

                這篇關于為 Windows Phone 8.1 在頁面之間傳遞數據的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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='msF05'></bdo><ul id='msF05'></ul>
                    <tfoot id='msF05'></tfoot>
                    <i id='msF05'><tr id='msF05'><dt id='msF05'><q id='msF05'><span id='msF05'><b id='msF05'><form id='msF05'><ins id='msF05'></ins><ul id='msF05'></ul><sub id='msF05'></sub></form><legend id='msF05'></legend><bdo id='msF05'><pre id='msF05'><center id='msF05'></center></pre></bdo></b><th id='msF05'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='msF05'><tfoot id='msF05'></tfoot><dl id='msF05'><fieldset id='msF05'></fieldset></dl></div>
                  • <legend id='msF05'><style id='msF05'><dir id='msF05'><q id='msF05'></q></dir></style></legend>
                        <tbody id='msF05'></tbody>
                    • <small id='msF05'></small><noframes id='msF05'>

                        • 主站蜘蛛池模板: 无码日韩精品一区二区免费 | 欧美激情综合色综合啪啪五月 | 91视频电影 | 亚洲电影第三页 | 看一级毛片视频 | 亚洲综合精品 | 精品三区| 久久精品亚洲一区二区三区浴池 | 久久久久网站 | 亚洲精品一区二区在线 | 91社区在线观看高清 | 欧美xxxx日本 | 久久99精品国产麻豆婷婷 | 一区二区三区四区在线视频 | 三级成人在线 | 亚洲综合在线一区 | 黄色在线免费观看视频 | 日本一区二区高清不卡 | 中文字幕在线视频观看 | 香蕉视频在线播放 | 美女爽到呻吟久久久久 | 日本一级淫片免费啪啪3 | 欧美色综合一区二区三区 | 成人在线视| 亚洲一本 | 国产色婷婷久久99精品91 | 欧洲精品视频一区 | 久久久久国产精品一区二区 | 国产成人亚洲精品自产在线 | 中文成人无字幕乱码精品 | 99精品电影| aaaa一级毛片| 天天操天天干天天透 | 日韩黄色免费 | 草久久久 | 国产欧美一区二区三区免费 | 美日韩免费视频 | av一区二区在线观看 | 亚洲国产一区二区视频 | 欧洲亚洲一区二区三区 | 久久久精|