How to attack a windows domain
2010-08-10 22:20
253 查看
动画显示效果是Silverlight/WPF平台中一个非常重要的功能。下面我们就来看一看如何为C1Menu for Silverlight添加动画显示效果。
为了添加动画显示效果,我们需要修改C1Menu的默认模板,并修改Opened的VisualState设置。
添加第一层菜单项动画效果FirstLevelMenuStyle
非第一层菜单项的动画效果
源码下载:VS2010 + Silverlight5.0 + ComponentOne Studio for Silverlight 2012V2
为了添加动画显示效果,我们需要修改C1Menu的默认模板,并修改Opened的VisualState设置。
添加第一层菜单项动画效果FirstLevelMenuStyle
<VisualState x:Name="Opened"> <Storyboard> <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.00100000" Storyboard.TargetName="OpenedElement" Storyboard.TargetProperty="(UIElement.Visibility)"> <DiscreteObjectKeyFrame KeyTime="00:00:00"> <DiscreteObjectKeyFrame.Value> <Visibility>Visible</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> <!—可以修改Duration的值来加快/减慢动画显示速度--> <DoubleAnimation From="0" To="1" BeginTime="00:00:00" Duration="00:00:00.30000" Storyboard.TargetName="AnimationContent" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)"> </DoubleAnimation> </Storyboard> </VisualState>
非第一层菜单项的动画效果
<VisualState x:Name="Opened"> <Storyboard> <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="OpenedElement" Storyboard.TargetProperty="(UIElement.Visibility)"> <DiscreteObjectKeyFrame KeyTime="00:00:00"> <DiscreteObjectKeyFrame.Value> <Visibility>Visible</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> <!—可以修改Duration的值来加快/减慢动画显示速度--> <DoubleAnimation From="0" To="1" BeginTime="00:00:00" Duration="00:00:00.300000" Storyboard.TargetName="_contentControl" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"> </DoubleAnimation> </Storyboard> </VisualState>
源码下载:VS2010 + Silverlight5.0 + ComponentOne Studio for Silverlight 2012V2
相关文章推荐
- How to attack a windows domain
- How to attack a windows domain
- How to attack a windows domain
- How to attack a windows domain
- How to integrate custom security policy into Windows domain authentication
- How to join a Ubuntu to Windows Domain
- How to Join a Windows Media Center PC to a Domain
- [reproduce]How to Create Domain in Windows Server 2012.
- How to use the Install from Media feature to promote Windows Server 2003-based domain controllers
- How to reset the Domain Admin Password under Windows Server 2003
- How to hijack domain name in windows - 如何实现 Windows 本地域名劫持
- How to own a Windows Domain
- How to integrate custom security policy with Windows domain authentication in ASP.NET
- How to Install PHP 5 for Iis 6 on Windows Xp and 2003 - wikiHow
- How to install an SSH Server in Windows Server 2008
- How to Run a Program as an Administrator in Windows 7
- How to share folder to windows from ubuntu with samba.
- How to install Ruby on rails in Windows 2003/xp 如何安装ROR
- How to debug test code on Windows Mobile Emulator with Visual Studio
- How to detect Windows 64 bit platform with .net?