Silverlight动画技术全面解析
1. 页面过渡动画基础
在Silverlight应用中,若要实现页面间的动画过渡,可假设应用的根元素为 Grid 。以下是相关代码示例:
' This Grid will host your pages.
Private rootGrid As New Grid()
Private Sub Application_Startup(ByVal sender As Object, ByVal e As StartupEventArgs)
' Load the first page.
Me.RootVisual = rootGrid
rootGrid.Children.Add(New Page())
End Sub
为实现页面过渡动画,可采用基类 PageTransitionBase 。该类存储了故事板、上一个页面和新页面等信息:
Public MustInherit Class PageTransitionBase
Protected storyboard As New Storyboard()
Protected oldPage As UserControl
Protected newPage As UserControl
Public Sub New()
AddHandler storyboard.Completed, AddressOf Transi
超级会员免费看
订阅专栏 解锁全文
33

被折叠的 条评论
为什么被折叠?



