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

  • <tfoot id='xbYF5'></tfoot>

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

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

        Siliverlight 3 用戶(hù)控件之間的導(dǎo)航?

        Siliverlight 3 Navigation between user controls?(Siliverlight 3 用戶(hù)控件之間的導(dǎo)航?)
            <tbody id='zl3XQ'></tbody>

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

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

        • <tfoot id='zl3XQ'></tfoot>

                • <bdo id='zl3XQ'></bdo><ul id='zl3XQ'></ul>
                  <legend id='zl3XQ'><style id='zl3XQ'><dir id='zl3XQ'><q id='zl3XQ'></q></dir></style></legend>
                  本文介紹了Siliverlight 3 用戶(hù)控件之間的導(dǎo)航?的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  我剛剛開(kāi)始掌握來(lái)自 ASP.NET 和 Flex 的 silverlight 3.

                  Im just starting to get to grips with silverlight 3, coming from ASP.NET and Flex.

                  我已經(jīng)按照這里的新導(dǎo)航教程閱讀了身份驗(yàn)證和角色管理教程.

                  I have followed the new navigation tutorial here and read through the authentication and role management tutorials also.

                  所以,我有一個(gè)主頁(yè),它有一個(gè)框架、網(wǎng)格內(nèi)部和幾個(gè)視圖.這些都是可導(dǎo)航的并且工作正常.我認(rèn)為這個(gè)主頁(yè)是我的小應(yīng)用程序的母版頁(yè).

                  So, i have a main page, which has a frame, inside of the grid, and several views. These are all navigatable and working fine. I see this main page as kind of a master page to my little application i have i mind.

                  所以知道我想要一個(gè) login.xaml 用戶(hù)控件.這將處理所有登錄,一旦通過(guò)身份驗(yàn)證,我想導(dǎo)航到 MainPage,并使用它的框架從那里開(kāi)始.

                  So know I want to have a login.xaml UserControl. This will handle all login and once authenticated I want to navigate to the MainPage, and the use its frame to go from there.

                  我不只是想簡(jiǎn)單地在我的框架中使用登錄作為一個(gè)單獨(dú)的頁(yè)面,因?yàn)槲蚁M卿浭褂门c應(yīng)用程序的其余部分不同的網(wǎng)格,并且也是獨(dú)立的.

                  I dont just want to simply use login as a seprate page within my frame as I want the login to use a different grid to the rest of the app, and also to be separate.

                  那么我將如何從一個(gè)用戶(hù)控件(登錄)導(dǎo)航到另一個(gè)(主)?

                  So how would I navigate from one user control (Login) to another (Main) ?

                  我試過(guò)了

                   private void btnLogin_Click(object sender, RoutedEventArgs e)
                      {
                          //TO - DO: All the auth work, just want navigation sorted first
                  
                          this.Visibility = Visibility.Collapsed;
                          App.Current.RootVisual = new MainPage(); 
                      }
                  

                  沒(méi)有運(yùn)氣.我也嘗試過(guò)初始化一個(gè)新的 main 并設(shè)置它的可見(jiàn)性,但這當(dāng)然不起作用.

                  With no luck. Ive also tried just init'n a new main and setting its Visibility but this of course doesnt work.

                  我是否以正確的方式處理這個(gè)問(wèn)題?

                  Am I even approaching this in the correct way?

                  非常感謝.

                  編輯 - 進(jìn)一步挖掘之后,這個(gè) 看起來(lái)像是一種可以做我所追求的方法,但它確實(shí)感覺(jué)有點(diǎn)駭人聽(tīng)聞!這是 silverlight 3 的建議方式嗎?再次感謝

                  Edit - Ok after digging a little further, this looks like an approach that will do what im after, but it does feel a little hackish! Is this the suggested way for siverlight 3? Thanks Again

                  推薦答案

                  我通常做的是創(chuàng)建一個(gè) System.Windows.Controls.Navigation 類(lèi)型的MainPage.xaml".這被分配給我的應(yīng)用程序的 RootVisual 屬性;它幾乎是空的,除了一個(gè)導(dǎo)航框架:

                  What I've usually done is to create a "MainPage.xaml" which is of type System.Windows.Controls.Navigation. That gets assigned to the RootVisual property of my application; it's pretty much empty, except for a navigation frame:

                  <navigation:Page 
                  x:Class="Client.MainPage" 
                  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
                  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                  xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
                  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
                  xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
                  mc:Ignorable="d" 
                  d:DesignWidth="400" 
                  d:DesignHeight="400" MinWidth="700" MinHeight="480"
                  HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                  Title="Main SlideLinc Page">
                  <Grid x:Name="LayoutRoot">
                      <navigation:Frame x:Name="rootFrame" />
                  </Grid>
                  </navigation:Page>
                  

                  然后我使用rootFrame"導(dǎo)航框架來(lái)處理我所有的導(dǎo)航需求,例如,使用來(lái)自靜態(tài) NavigationManager 類(lèi)的這些方法:

                  Then I use the "rootFrame" navigation frame to handle all my navigation needs, e.g., with these methods from a static NavigationManager class:

                      public static void Navigate(string url, Action<Exception, UIElement> callback)
                      {
                          Navigate(new Uri(url, UriKind.RelativeOrAbsolute), callback);
                      }
                  
                      public static void Navigate(Uri uri, Action<Exception, UIElement> callback)
                      {
                          if (rootFrame == null)
                          {
                              Logger.LogMessage("Can't use navigation, because rootFrame is null");
                              ErrorMessageBox.Show(ClientStrings.NavigationFailed);
                          }
                          else
                          {
                              NavigatedEventHandler successHandler = null;
                              NavigationFailedEventHandler failureHandler = null;
                              successHandler = (s, e) =>
                                   {
                                       rootFrame.Navigated -= successHandler;
                                       rootFrame.NavigationFailed -= failureHandler;
                                       if (callback != null)
                                       {
                                           callback(null, e.Content as UIElement);
                                       }
                                   };
                              failureHandler = (s, e) =>
                                  {
                                      rootFrame.Navigated -= successHandler;
                                      rootFrame.NavigationFailed -= failureHandler;
                                      if (callback != null)
                                      {
                                          callback(e.Exception, null);
                                      }
                                  };
                              rootFrame.Navigated += successHandler;
                              rootFrame.NavigationFailed += failureHandler;
                              rootFrame.Navigate(uri);
                          }
                      }
                  

                  所以在你的情況下,你可以像這樣使用它:

                  So in your case, you might use it like:

                  NavigationManager.Navigate(new Uri("/Login.xaml", UriKind.Relative), null);
                  

                  或者:

                  NavigationManager.Navigate(new Uri("/Home.xaml", UriKind.Relative), (error, element) => InitializeElement(element));
                  

                  這篇關(guān)于Siliverlight 3 用戶(hù)控件之間的導(dǎo)航?的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  Ignore whitespace while reading XML(讀取 XML 時(shí)忽略空格)
                  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(解析格式錯(cuò)誤的 XML)
                  <legend id='C2rn4'><style id='C2rn4'><dir id='C2rn4'><q id='C2rn4'></q></dir></style></legend>
                  <tfoot id='C2rn4'></tfoot>

                    <tbody id='C2rn4'></tbody>

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

                          <bdo id='C2rn4'></bdo><ul id='C2rn4'></ul>
                          1. <i id='C2rn4'><tr id='C2rn4'><dt id='C2rn4'><q id='C2rn4'><span id='C2rn4'><b id='C2rn4'><form id='C2rn4'><ins id='C2rn4'></ins><ul id='C2rn4'></ul><sub id='C2rn4'></sub></form><legend id='C2rn4'></legend><bdo id='C2rn4'><pre id='C2rn4'><center id='C2rn4'></center></pre></bdo></b><th id='C2rn4'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='C2rn4'><tfoot id='C2rn4'></tfoot><dl id='C2rn4'><fieldset id='C2rn4'></fieldset></dl></div>
                          2. 主站蜘蛛池模板: 亚洲成人日韩 | 国产女人与拘做受免费视频 | 久久这里只有精品首页 | 成人免费影院 | 日日日操 | 国产目拍亚洲精品99久久精品 | 特级一级黄色片 | 亚洲一区av在线 | 黄网站免费在线看 | 日日草天天干 | 国产综合精品一区二区三区 | 国产成人精品一区二 | 欧美a在线观看 | www.日韩在线 | 伊人久久大香线 | 日本三级在线 | 中文字幕在线观看一区 | 国产综合久久 | 99re6在线视频精品免费 | 国产精品久久久久一区二区三区 | 91在线精品一区二区 | 91大片| 二区精品 | 成人午夜激情 | 91久久久久久 | 一区二区av | 一a一片一级一片啪啪 | 日本精品一区二区三区在线观看视频 | 国产精品久久久久无码av | 黄色一级大片视频 | 涩色视频在线观看 | 国产99精品| 欧美最猛黑人 | 龙珠z在线观看 | 精品91久久 | 欧美中文一区 | 美女逼网站 | 日韩视频高清 | 精品久久精品 | 我要看黄色录像一级片 | 欧美aaaaa|