zoukankan      html  css  js  c++  java
  • SilverLight 4页面跳转大全

    //Silverlight页面的跳转
    //(Application.Current.RootVisual as IContent).Content = new DragControl();
    //普通页面跳转
    HtmlWindow html = HtmlPage.Window;
    //html.Navigate(new Uri("http://www.0379zd.com"));//普通网址
    html.Navigate(new Uri("../Index.aspx", UriKind.Relative));//相对路径

     
    参考一:
    方法一: 可跳转到网页
                      HtmlWindow html = HtmlPage.Window;
                      html.Navigate(new Uri(item.Link_Page.Trim(), UriKind.Relative), "_blank");

                       //System.Windows.Browser.HtmlPage.PopupWindow(new Uri(HtmlPage.Document.DocumentUri, item.Link_Page.Trim()), "_Blank",null);

    方法二:跳转到Xaml页
                this.Content = new About();

    方法三:框架跳转item.Link_Page.Trim():代表xaml名 e.g: /views/home  
               events = new System.Uri(item.Link_Page.Trim(), UriKind.Relative);
               this.ContentFrame.Source = events;

    框架
     <navigation:Frame x:Name="ContentFrame" Style="{StaticResource ContentFrameStyle}"
                                  Source="/Views/About" Navigated="ContentFrame_Navigated" NavigationFailed="ContentFrame_NavigationFailed">
                    <navigation:Frame.UriMapper>
                      <uriMapper:UriMapper>
                        <uriMapper:UriMapping Uri="" MappedUri="/Views/Home.xaml"/>
                        <uriMapper:UriMapping Uri="/Views/{pageName}" MappedUri="/Views/{pageName}.xaml"/>  
                        <uriMapper:UriMapping Uri="/{pageName}" MappedUri="/{pageName}.xaml"/>
                      </uriMapper:UriMapper>
                    </navigation:Frame.UriMapper>              
                </navigation:Frame> 
    链接
    <HyperlinkButton x:Name="userid" NavigateUri="/Views/Home"  Style="{StaticResource LinkStyle}" TargetName="ContentFrame" />


    本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/lihaiyin/archive/2010/06/17/5674766.aspx

  • 相关阅读:
    Flex布局新写法兼容写法详解
    一个CSS值转REM的Sublime Text插件
    Oracle SQL函数之转换函数To_char汇总
    Oracle SQL函数之日期函数
    Oracle SQL函数之数学函数
    Oracle SQL函数之字符串函数
    Sybase isql常用命令
    sybase用户管理(创建、授权、删除)
    使用isql连接Sybase ASE数据库的常见错误及处理方式
    Sybase配置中文语言支持及字符集
  • 原文地址:https://www.cnblogs.com/yeye518/p/2231654.html
Copyright © 2011-2022 走看看