理解Navigation导航框架Page类
最后更新于:2022-04-01 14:21:15
![](https://docs.gechiui.com/gc-content/uploads/sites/kancloud/2016-03-18_56eb67c868925.jpg)
在“[Silverlight实例教程 - 理解Navigation导航框架Frame类](http://blog.csdn.net/jv9/article/details/6576016)” 介绍了Silverlight Navigation框架主要对象之一,Frame类,该类可以被简单的理解为Silverlight Navigation页面承载框架,框架中提供丰富的属性,方法和事件,从而实现Navigation框架功能。本篇将继续介绍Silverlight Navigation框架另外一个重要对象,Page类。
Page类,在Silverlight导航框架中主要功能是作为导航内容页载入到导航框架Frame类,从功能上来讲Page类是一个Silverlight UserControl, 而不同的是,Page类具备特定的导航属性和方法。 同样,从Asp.Net应用开发角度理解,Page类可以被看作为Master Page承载具体功能的子页面。
从Silverlight SDK中可以看出,Page类继承System.Windows.Controls.UserControl,也就是说Page类是一个用户控件类,可被任何ContentControl内容控件类(Frame类)承载显示。
~~~
System.Object
System.Windows.DependencyObject
System.Windows.UIElement
System.Windows.FrameworkElement
System.Windows.Controls.Control
System.Windows.Controls.UserControl
System.Windows.Controls.Page
~~~
虽然Page类页面派生自UserControl,但是作为独立页面类,其具有特殊的页面命名空间,其页面初始化XAML代码如下:
~~~
<navigation:Page x:Class="SilverlightNavigationDemo.Home"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480"
Title="首页"
Style="{StaticResource PageStyle}">
~~~
与UserControl页面不同的是<navigation:Page ..> </navigation:Page> .
值得注意的是,Silverlight导航框架Page类派生自UserControl,没有提供特定的事件,而该类继承了UserControl类事件。
从前文可知,在Silverlight导航框架中,Frame类功能是承载Page类,在整个导航过程中,两个类相互依存,而完整的导航进程事件运行顺序如下图:
![](https://docs.gechiui.com/gc-content/uploads/sites/kancloud/2016-03-18_56eb67d018ce6.gif)
虽然Silverlight导航框架Page类没有定义专属事件,但是该类提供了专属的属性和方法,以供开发人员在导航过程中,对Page页面进行控制。
Silverlight导航框架常用**Page类属性**:
<table style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; BORDER-COLLAPSE: collapse; BORDER-TOP: medium none; BORDER-RIGHT: medium none" border="1" cellspacing="0" cellpadding="0"><tbody><tr><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 106.8pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="142"><p style="TEXT-ALIGN: center; LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" align="center"><strong><span style="font-family:宋体;FONT-SIZE: 12pt">属性</span></strong></p></td><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 106.8pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="142"><p style="TEXT-ALIGN: center; LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" align="center"><strong><span style="font-family:宋体;FONT-SIZE: 12pt">类型</span></strong></p></td><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 224.15pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="299"><p style="TEXT-ALIGN: center; LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" align="center"><strong><span style="font-family:宋体;FONT-SIZE: 12pt">描述</span></strong></p></td></tr><tr><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 106.8pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="142"><p style="TEXT-ALIGN: center; LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" align="center"><span style="font-family:宋体;FONT-SIZE: 12pt">NavigationCacheMode</span></p></td><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 106.8pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="142"><p style="TEXT-ALIGN: center; LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" align="center"><span style="font-family:宋体;FONT-SIZE: 12pt">NavigationCacheMode</span></p></td><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 224.15pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="299"><p style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt"><span style="font-family:宋体;FONT-SIZE: 12pt">该属性用于获取或设置一个值,改制指定当前导航页面是否开启导航缓存;该属性默认值为</span><span style="font-family:宋体;FONT-SIZE: 12pt">Disabled</span><span style="font-family:宋体;FONT-SIZE: 12pt">(表示不开启导航缓存),</span><span style="font-family:宋体;FONT-SIZE: 12pt">Enabled</span><span style="font-family:宋体;FONT-SIZE: 12pt">和</span><span style="font-family:宋体;FONT-SIZE: 12pt">Required</span><span style="font-family:宋体;FONT-SIZE: 12pt">属性值表示开启导航缓存,其不同的是</span><span style="font-family:宋体;FONT-SIZE: 12pt">Required</span><span style="font-family:宋体;FONT-SIZE: 12pt">不受</span><span style="font-family:宋体;FONT-SIZE: 12pt">CacheSize</span><span style="font-family:宋体;FONT-SIZE: 12pt">限制,每次导航时都重复利用缓存实例;而</span><span style="font-family:宋体;FONT-SIZE: 12pt">Enabled</span><span style="font-family:宋体;FONT-SIZE: 12pt">受制于</span><span style="font-family:宋体;FONT-SIZE: 12pt">CacheSize</span><span style="font-family:宋体;FONT-SIZE: 12pt">缓存尺寸,超过尺寸时则放弃缓存实例</span></p></td></tr><tr><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 106.8pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="142"><p style="TEXT-ALIGN: center; LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" align="center"><span style="font-family:宋体;FONT-SIZE: 12pt">NavigationContext</span></p></td><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 106.8pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="142"><p style="TEXT-ALIGN: center; LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" align="center"><span style="font-family:宋体;FONT-SIZE: 12pt">NavigationContext</span></p></td><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 224.15pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="299"><p style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt"><span style="font-family:宋体;FONT-SIZE: 12pt">获取当前导航请求中的对象信息,该属性常被用于获取</span><span style="font-family:宋体;FONT-SIZE: 12pt">URI</span><span style="font-family:宋体;FONT-SIZE: 12pt">查询字符串值,实现导航框架传值</span></p></td></tr><tr><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 106.8pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="142"><p style="TEXT-ALIGN: center; LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" align="center"><span style="font-family:宋体;FONT-SIZE: 12pt">NavigationService</span></p></td><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 106.8pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="142"><p style="TEXT-ALIGN: center; LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" align="center"><span style="font-family:宋体;FONT-SIZE: 12pt">NavigationService</span></p></td><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 224.15pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="299"><p style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt"><span style="font-family:宋体;FONT-SIZE: 12pt">获取当前导航框架导航服务实例,通过该属性可以获取当前页面导航请求,该属性将在后文详细讲解。</span></p></td></tr><tr><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 106.8pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="142"><p style="TEXT-ALIGN: center; LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" align="center"><span style="font-family:宋体;FONT-SIZE: 12pt">Title</span></p></td><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 106.8pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="142"><p style="TEXT-ALIGN: center; LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" align="center"><span style="font-family:宋体;FONT-SIZE: 12pt">String</span></p></td><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 224.15pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="299"><p style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt"><span style="font-family:宋体;FONT-SIZE: 12pt">该属性用于获取或设置当前导航页面的名称</span></p></td></tr></tbody></table>
Silverlight导航框架常用**Page类方法**:
<table style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; BORDER-COLLAPSE: collapse; BORDER-TOP: medium none; BORDER-RIGHT: medium none" border="1" cellspacing="0" cellpadding="0"><tbody><tr><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 130.8pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="174"><p style="TEXT-ALIGN: center; LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" align="center"><strong><span style="font-family:宋体;FONT-SIZE: 12pt">方法</span></strong></p></td><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 312pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="416"><p style="TEXT-ALIGN: center; LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" align="center"><strong><span style="font-family:宋体;FONT-SIZE: 12pt">描述</span></strong></p></td></tr><tr><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 130.8pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="174"><p style="TEXT-ALIGN: center; LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" align="center"><span style="font-family:宋体;FONT-SIZE: 12pt">OnFragmentNavigation</span></p></td><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 312pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="416"><p style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt"><span style="font-family:宋体;FONT-SIZE: 12pt">该方法在导航到页面上的片段时被调用</span></p></td></tr><tr><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 130.8pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="174"><p style="TEXT-ALIGN: center; LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" align="center"><span style="font-family:宋体;FONT-SIZE: 12pt">OnNavigatedFrom</span></p></td><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 312pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="416"><p style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt"><span style="font-family:宋体;FONT-SIZE: 12pt">该方法在当前页面不再为导航框架中的活动页面时被调用</span></p></td></tr><tr><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 130.8pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="174"><p style="TEXT-ALIGN: center; LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" align="center"><span style="font-family:宋体;FONT-SIZE: 12pt">OnNavigatedTo</span></p></td><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 312pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="416"><p style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt"><span style="font-family:宋体;FONT-SIZE: 12pt">该方法在当前页面成为导航框架中的活动页面时被调用</span></p></td></tr><tr><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 130.8pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="174"><p style="TEXT-ALIGN: center; LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" align="center"><span style="font-family:宋体;FONT-SIZE: 12pt">OnNavigatingFrom</span></p></td><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 312pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="416"><p style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt"><span style="font-family:宋体;FONT-SIZE: 12pt">该方法在当前页面不再为导航框架中的活动页面前被调用</span></p></td></tr></tbody></table>
**Page类的NavigationService属性**
在 Page类属性中,最常用的属性是NavigationService, 该属性主要提供页面导航入口点地址,简单的理解是该属性是为导航框架Page类页面提供框架内页面内部导航功能,从某一页面内导航到其他 页面或者当前页面的其他表示形式。NavigationService属性提供 一个同名对象类NavigationService,所以,学习NavigationService属性也就是学习NavigationService类的过程。
**NavigationService类**包含五个方法帮助实现页面内导航功能,
<table style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; BORDER-COLLAPSE: collapse; BORDER-TOP: medium none; BORDER-RIGHT: medium none" border="1" cellspacing="0" cellpadding="0"><tbody><tr><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 104.65pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="140"><p style="TEXT-ALIGN: center; LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" align="center"><strong><span style="font-family:宋体;FONT-SIZE: 12pt">方法</span></strong></p></td><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 333.1pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="444"><p style="TEXT-ALIGN: center; LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" align="center"><strong><span style="font-family:宋体;FONT-SIZE: 12pt">描述</span></strong></p></td></tr><tr><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 104.65pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="140"><p style="TEXT-ALIGN: center; LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" align="center"><span style="font-family:宋体;FONT-SIZE: 12pt">GoBack</span></p></td><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 333.1pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="444"><p style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt"><span style="font-family:宋体;FONT-SIZE: 12pt">该方法用于导航当前页面后退到历史记录中上一页,如果后退导航时没有历史记录页面,则返回异常</span></p></td></tr><tr><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 104.65pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="140"><p style="TEXT-ALIGN: center; LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" align="center"><span style="font-family:宋体;FONT-SIZE: 12pt">GoForward</span></p></td><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 333.1pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="444"><p style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt"><span style="font-family:宋体;FONT-SIZE: 12pt">该方法用于导航当前页面前进到历史记录中下一页,如果前进导航时没有历史记录页面,则返回异常</span></p></td></tr><tr><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 104.65pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="140"><p style="TEXT-ALIGN: center; LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" align="center"><span style="font-family:宋体;FONT-SIZE: 12pt">Navigate</span></p></td><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 333.1pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="444"><p style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt"><span style="font-family:宋体;FONT-SIZE: 12pt">该方法用于导航到指定</span><span style="font-family:宋体;FONT-SIZE: 12pt">URI</span><span style="font-family:宋体;FONT-SIZE: 12pt">页面,该</span><span style="font-family:宋体;FONT-SIZE: 12pt">URI</span><span style="font-family:宋体;FONT-SIZE: 12pt">可以是导航映射相对地址,也可以是导航页面绝对地址</span></p></td></tr><tr><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 104.65pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="140"><p style="TEXT-ALIGN: center; LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" align="center"><span style="font-family:宋体;FONT-SIZE: 12pt">Refresh</span></p></td><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 333.1pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="444"><p style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt"><span style="font-family:宋体;FONT-SIZE: 12pt">该方法用于重载当前导航页,该方法经常被用于自定义</span><span style="font-family:宋体;FONT-SIZE: 12pt">INavigationContentLoader</span></p></td></tr><tr><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 104.65pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="140"><p style="TEXT-ALIGN: center; LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" align="center"><span style="font-family:宋体;FONT-SIZE: 12pt">StopLoading</span></p></td><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 333.1pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="444"><p style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt"><span style="font-family:宋体;FONT-SIZE: 12pt">该方法用于停止所有导航异步进程,该方法常被用于停止正在下载载入的导航页面</span></p></td></tr></tbody></table>
另外,NavigationService类提供以下常用属性和事件:
<table style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; BORDER-COLLAPSE: collapse; BORDER-TOP: medium none; BORDER-RIGHT: medium none" border="1" cellspacing="0" cellpadding="0"><tbody><tr><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 104.65pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="140"><p style="TEXT-ALIGN: center; LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" align="center"><strong><span style="font-family:宋体;FONT-SIZE: 12pt">方法</span></strong></p></td><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 333.1pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="444"><p style="TEXT-ALIGN: center; LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" align="center"><strong><span style="font-family:宋体;FONT-SIZE: 12pt">描述</span></strong></p></td></tr><tr><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 104.65pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="140"><p style="TEXT-ALIGN: center; LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" align="center"><span style="font-family:宋体;FONT-SIZE: 12pt">GoBack</span></p></td><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 333.1pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="444"><p style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt"><span style="font-family:宋体;FONT-SIZE: 12pt">该方法用于导航当前页面后退到历史记录中上一页,如果后退导航时没有历史记录页面,则返回异常</span></p></td></tr><tr><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 104.65pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="140"><p style="TEXT-ALIGN: center; LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" align="center"><span style="font-family:宋体;FONT-SIZE: 12pt">GoForward</span></p></td><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 333.1pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="444"><p style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt"><span style="font-family:宋体;FONT-SIZE: 12pt">该方法用于导航当前页面前进到历史记录中下一页,如果前进导航时没有历史记录页面,则返回异常</span></p></td></tr><tr><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 104.65pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="140"><p style="TEXT-ALIGN: center; LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" align="center"><span style="font-family:宋体;FONT-SIZE: 12pt">Navigate</span></p></td><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 333.1pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="444"><p style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt"><span style="font-family:宋体;FONT-SIZE: 12pt">该方法用于导航到指定</span><span style="font-family:宋体;FONT-SIZE: 12pt">URI</span><span style="font-family:宋体;FONT-SIZE: 12pt">页面,该</span><span style="font-family:宋体;FONT-SIZE: 12pt">URI</span><span style="font-family:宋体;FONT-SIZE: 12pt">可以是导航映射相对地址,也可以是导航页面绝对地址</span></p></td></tr><tr><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 104.65pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="140"><p style="TEXT-ALIGN: center; LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" align="center"><span style="font-family:宋体;FONT-SIZE: 12pt">Refresh</span></p></td><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 333.1pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="444"><p style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt"><span style="font-family:宋体;FONT-SIZE: 12pt">该方法用于重载当前导航页,该方法经常被用于自定义</span><span style="font-family:宋体;FONT-SIZE: 12pt">INavigationContentLoader</span></p></td></tr><tr><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 104.65pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="140"><p style="TEXT-ALIGN: center; LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" align="center"><span style="font-family:宋体;FONT-SIZE: 12pt">StopLoading</span></p></td><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 333.1pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="444"><p style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt"><span style="font-family:宋体;FONT-SIZE: 12pt">该方法用于停止所有导航异步进程,该方法常被用于停止正在下载载入的导航页面</span></p></td></tr></tbody></table>
<table style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; BORDER-COLLAPSE: collapse; BORDER-TOP: medium none; BORDER-RIGHT: medium none" border="1" cellspacing="0" cellpadding="0"><tbody><tr><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 118.8pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="158"><p style="TEXT-ALIGN: center; LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" align="center"><strong><span style="font-family:宋体;FONT-SIZE: 12pt">事件</span></strong></p></td><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 324pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="432"><p style="TEXT-ALIGN: center; LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" align="center"><strong><span style="font-family:宋体;FONT-SIZE: 12pt">描述</span></strong></p></td></tr><tr><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 118.8pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="158"><p style="TEXT-ALIGN: center; LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" align="center"><span style="font-family:宋体;FONT-SIZE: 12pt">FragmentNavigation</span></p></td><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 324pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="432"><p style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt"><span style="font-family:宋体;FONT-SIZE: 12pt">该事件在导航到内容片段时被激活</span></p></td></tr><tr><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 118.8pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="158"><p style="TEXT-ALIGN: center; LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" align="center"><span style="font-family:宋体;FONT-SIZE: 12pt">Navigated</span></p></td><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 324pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="432"><p style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt"><span style="font-family:宋体;FONT-SIZE: 12pt">该事件在导航完成时被激活</span></p></td></tr><tr><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 118.8pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="158"><p style="TEXT-ALIGN: center; LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" align="center"><span style="font-family:宋体;FONT-SIZE: 12pt">Navigating</span></p></td><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 324pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="432"><p style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt"><span style="font-family:宋体;FONT-SIZE: 12pt">该事件在导航开始时被激活</span></p></td></tr><tr><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 118.8pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="158"><p style="TEXT-ALIGN: center; LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" align="center"><span style="font-family:宋体;FONT-SIZE: 12pt">NavigationFailed</span></p></td><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 324pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="432"><p style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt"><span style="font-family:宋体;FONT-SIZE: 12pt">该事件在导航抛出异常失败时被激活</span></p></td></tr><tr><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 118.8pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="158"><p style="TEXT-ALIGN: center; LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" align="center"><span style="font-family:宋体;FONT-SIZE: 12pt">NavigationStopped</span></p></td><td style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 5.4pt; WIDTH: 324pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0cm" width="432"><p style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt"><span style="font-family:宋体;FONT-SIZE: 12pt">该事件在</span><span style="font-family:宋体;FONT-SIZE: 12pt">StopLoading</span><span style="font-family:宋体;FONT-SIZE: 12pt">方法被调用时,或者取消当前导航请求时被激活</span></p></td></tr></tbody></table>
而与上一篇介绍Frame类对比,会发现NavigationService类提供的属性,方法和事件和Frame类中的属性,方法和事件基本类似,其功能性也有重叠。从而可以这样理解,在Silverlight导航框架Page类中,允许在导航页面内触发页面导航行为,其效果与Frame类实现效果相同。
例如:
this.NavigationService.Navigate(new Uri(“/Home.xaml”, UriKind.Relative));
但是,两者也有不同之处,例如Frame类提供部分依赖属性,可供控件进行直接绑定和调用,例如IsEnabled, 通过该属性可以实现当前Frame是否可用。而NavigationService不能实现该绑定效果。
对于NavigationService类而言,其页面导航方法如上代码,值得注意的是该类包含两个特殊的方法,分别是Refresh()和StopLoading(), 这两个方法主要针对当前页面进行操作,其简单描述如下:
**Refresh方法**,功能类似浏览器的刷新按钮,该方法将重载当前Page类页面,实现页面刷新效果,如果页面允许支持缓存,将从缓存中读取当前页面。
**StopLoading方法**,功能类似浏览器的停止按钮,该方法将停止正在运行的页面载入进程或者其他异步进程,在实际项目中,该方法并不常用。
**Page类的NavigationContext属性**
Page 类提供的另外一个重要属性是NavigationContext属性,该属性提供一个NavigationContext对象,而该对象中包含两个常用属性分别是Uri和QueryString。在实际项目中,经常会使用NavigationContext.Uri获取当前URI路径字符串,使用 NavigationContext.QueryString获取导航页面传值。 例如:
string uriText = String.Format(“/User.xaml?userID={0}&role={1}”, userID, userRole);
mainFrame.Navigate(new Uri(uriText), UriKind.Relative);
执行以上代码,当前导航框架将访问如下地址: /User.xaml?userID=6&role=1
在User.xaml页面将使用NavigationContext.QueryString获取userID和userRole参数值,以获取详细用户信息。
~~~
int userID, userRole;
if (this.NavigationContext.QueryString.ContainsKey(“userID”))
userID = Int32.Parse(this.NavigationContext.QueryString[“userID”]);
if (this.NavigationContext.QueryString.ContainsKey(“userRole”))
userRole = Int32.Parse(this.NavigationContext.QueryString[“userRole”]);
~~~
**Page类的NavigationCacheMode属性**
Page 类的NavigationCacheMode属性是Silverlight导航框架重要属性之一,其功能可以保存导航页面状态。 NavigationCacheMode属性中包含有三个枚举成员,分别是Disabled,Required和Enabled,其含义分别是:
NavigationCacheMode.Disabled: 不支持缓存页面,每次导航应用访问时创建 一个新的页面实例;
NavigationCacheMode.Required: 支持缓存页面,并且每次导航应用访问时都重复利用该缓存实例,而且忽略Frame类中CacheSize属性设置大小;
NavigationCacheMode.Enabled: 支持缓存页面,如果超过Frame类中CacheSize属性设置尺寸,则放弃保存缓存实例;
默认情况下,NavigationCacheMode为Disabled状态,也就是说,在Silverlight导航框架应用时,不记录任何信息到缓存。当NavigationCacheMode状态设置为Required后,每当用户结束一次导航操作,Frame类将保存页面对象到内存,当用户点击返回或者前进时,将重新载入保存的缓存状态到当前Page类页面,而当前Page类页面的构造函数不再执行,但是其Loaded事件将被激活。当 NavigationCacheMode为Enabled状态时,则会参考Frame类中CacheSize属性设置尺寸设置。例如:如果设置Frame 类CacheSize属性值为6,当第七个Page类页面载入时,第一个载入到缓存的Page类 页面将会从缓存中删除,而最新的Page类页面将会替代。
需要注意的是,当允许导航页面缓存时,位于内存中的导航页面具有完整的页面处理流程,也就是说,当前台页面重新刷新载入时,缓存中所有的页面Loaded事件都会同时执行,从而达到保存页面状态的目的,当用户需要访问上一级或下一级页面时,则会节省页面初始化事件,相对提高应用效率。
Silverlight导航框架Page类属于导航基础类之一,在随后的实例演示中,会经常用到其属性和方法,对于该类推荐认真学习。
今天暂时介绍到这里。下一篇将介绍Silverlight导航框架常用应用话题。
[Silverlight实例教程系列 - Silverlight Validation验证实例](http://silverlightchina.net/html/zhuantixilie/getstart/2010/0924/2035.html)
[Silverlight实例教程系列 - Silverlight Out-of-Browser实例](http://silverlightchina.net/html/zhuantixilie/getstart/2010/0809/1709.html)
[Silverlight实例教程系列 - Expression Blend实例中文教程](http://silverlightchina.net/html/zhuantixilie/getstart/2010/0409/978.html)
欢迎大家加入“专注Silverlight”QQ技术群,欢迎大家加入一起学习讨论Silverlight&WPF&Widnows Phone开发技术。
22308706(一群) 超级群500人
37891947(二群) 超级群500人
100844510(三群) 高级群200人
32679922(四群) 超级群500人
23413513(五群) 高级群200人
32679955(六群) 超级群500人
61267622(七群) 超级群500人
88585140(八群) 超级群500人
128043302(九群 企业应用开发推荐群) 高级群200人
101364438(十群) 超级群500人
68435160(十一群 企业应用开发推荐群)超级群500人