http://www.templatemonster.com/silverlight-templates/28722.html
在菜单上,当单击菜单项时,“屏幕”向左滑动,然后新的“屏幕”从左向右滑动.
我真的想学习这些东西,但不知道这些’功能’被称为什么?例如,在xaml世界中调用的这些“屏幕”是什么?另外,在xaml世界中调用的“滑入/滑出”是什么?有人能指点我好文章/白皮书吗?
提前感谢任何建议.
解决方法 首先,Silverlight / WPF非常擅长这种东西.框架人员在设计xaml方面做得很好,尽可能灵活.据说承认在尝试这些事情之前还有很多事要做
像ResourceDictionaries,Triggers,Actions,Storyboards,动画(Keyframe / Double …),模板,Styles
但是一旦你得到这些比喻,就会更容易.
继承了一些引物的破败.
> Keyframe animation这是一些主要依靠的东西
> Triggers and Actions安排好
> Visual States这是小组看起来像’打开’/’关闭’
下面是一个样本供你把这些东西拉到一起.
<GrID x:name="LayoutRoot"> <visualstatemanager.VisualStateGroups> <VisualStateGroup x:name="CentrePanelStates"> <VisualStateGroup.Transitions> <VisualTransition GeneratedDuration="00:00:00"> <Storyboard> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.Targetname="grID" Storyboard.TargetProperty="(FrameworkElement.WIDth)"> <EasingDoubleKeyFrame KeyTime="00:00:00" Value="350"/> </DoubleAnimationUsingKeyFrames> </Storyboard> </VisualTransition> <VisualTransition GeneratedDuration="00:00:00.3000000" To="Open"> <Storyboard> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.Targetname="grID" Storyboard.TargetProperty="(FrameworkElement.WIDth)"> <EasingDoubleKeyFrame KeyTime="00:00:00" Value="350"> <EasingDoubleKeyFrame.EasingFunction> <PowerEase EasingMode="EaseIn"/> </EasingDoubleKeyFrame.EasingFunction> </EasingDoubleKeyFrame> <EasingDoubleKeyFrame KeyTime="00:00:00.6000000" Value="800"> <EasingDoubleKeyFrame.EasingFunction> <QuarticEase EasingMode="EaseInOut"/> </EasingDoubleKeyFrame.EasingFunction> </EasingDoubleKeyFrame> </DoubleAnimationUsingKeyFrames> </Storyboard> </VisualTransition> <VisualTransition From="Open" GeneratedDuration="00:00:00.3000000" To="Closed"> <VisualTransition.GeneratedEasingFunction> <BounceEase EasingMode="EaSEOut"/> </VisualTransition.GeneratedEasingFunction> <Storyboard> <DoubleAnimation Duration="00:00:00.6000000" Storyboard.Targetname="grID" Storyboard.TargetProperty="(FrameworkElement.WIDth)" BeginTime="00:00:00"> <DoubleAnimation.EasingFunction> <QuarticEase EasingMode="EaseInOut"/> </DoubleAnimation.EasingFunction> </DoubleAnimation> </Storyboard> </VisualTransition> </VisualStateGroup.Transitions> <VisualState x:name="Open"> <Storyboard> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.Targetname="grID" Storyboard.TargetProperty="(FrameworkElement.WIDth)"> <EasingDoubleKeyFrame KeyTime="00:00:00" Value="800"/> </DoubleAnimationUsingKeyFrames> </Storyboard> </VisualState> <VisualState x:name="Closed"/> </VisualStateGroup> </visualstatemanager.VisualStateGroups> <Rectangle VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Fill="#A1808080" /> <GrID name="CentrePanel" VerticalAlignment="Center" HorizontalAlignment="Center" WIDth="800" Height="500"> <border CornerRadius="3" Background="lightGray" HorizontalAlignment="left"> <GrID x:name="grID" WIDth="350" margin="2"> <GrID.RowDeFinitions> <RowDeFinition Height="*" /> <RowDeFinition Height="40" /> </GrID.RowDeFinitions> <GrID.ColumnDeFinitions> <ColumnDeFinition WIDth="350" /> <ColumnDeFinition WIDth="*" /> </GrID.ColumnDeFinitions> <Rectangle Fill="Beige" /> <Rectangle GrID.Column="1" Fill="#FFDDDCF5" /> <button Content="Close" WIDth="79" HorizontalAlignment="left" margin="94,130,0" Height="33" VerticalAlignment="top" > <i:Interaction.Triggers> <i:EventTrigger Eventname="Click"> <ic:GoToStateAction Statename="Closed"/> </i:EventTrigger> </i:Interaction.Triggers> </button> <button Content="Open" WIDth="81" HorizontalAlignment="left" margin="92,85,0" Height="32" VerticalAlignment="top" > <i:Interaction.Triggers> <i:EventTrigger Eventname="Click"> <ic:GoToStateAction Statename="Open"/> </i:EventTrigger> </i:Interaction.Triggers> </button> </GrID> </border> </GrID> </GrID>总结
以上是内存溢出为你收集整理的Silverlight项目 – 滑入式面板 – 如何?全部内容,希望文章能够帮你解决Silverlight项目 – 滑入式面板 – 如何?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)