C# Class WarshipGirl.Utilities.AnimationHelper

Mostra file Open project: jxpxxzj/WarshipGirl

Public Methods

Method Description
InDouble_X_Animation ( FrameworkElement myFrameworkElement, System.TimeSpan aTime, double dFrom, double dTo, System.Windows.Media.Animation.RepeatBehavior RForever, Window wind ) : System.Windows.Media.Animation.Storyboard

X方向移动动画(需要移动的对象、移动时间、相对控件原始位置的起始位置、相对控件原始位置的结束位置)(提升效率)Timeline.DesiredFrameRateProperty.OverrideMetadata(typeof(Timeline), new FrameworkPropertyMetadata { DefaultValue = 20 });

InDouble_Y_Animation ( FrameworkElement myFrameworkElement, System.TimeSpan aTime, double dFrom, double dTo, System.Windows.Media.Animation.RepeatBehavior RForever, Window wind ) : System.Windows.Media.Animation.Storyboard

Y方向移动动画(需要移动的对象、移动时间、相对控件原始位置的起始位置、相对控件原始位置的结束位置)(提升效率)Timeline.DesiredFrameRateProperty.OverrideMetadata(typeof(Timeline), new FrameworkPropertyMetadata { DefaultValue = 20 });

Opacity_Animation ( FrameworkElement myFrameworkElement, System.TimeSpan aTime, Window wind ) : System.Windows.Media.Animation.Storyboard

透明度播放—循环 (提升效率)Timeline.DesiredFrameRateProperty.OverrideMetadata(typeof(Timeline), new FrameworkPropertyMetadata { DefaultValue = 20 });

Opacity_Animation ( FrameworkElement myFrameworkElement, System.TimeSpan aTime, double dFrom, double dTo, System.Windows.Media.Animation.RepeatBehavior RBehavior, Window wind ) : System.Windows.Media.Animation.Storyboard

透明度播放-可传值(起始透明度,结束透明度,次数或是否循环)(提升效率)Timeline.DesiredFrameRateProperty.OverrideMetadata(typeof(Timeline), new FrameworkPropertyMetadata { DefaultValue = 20 });

Opacity_Animation ( FrameworkElement myFrameworkElement, System.TimeSpan aTime, double dFrom, double dTo, Window wind ) : System.Windows.Media.Animation.Storyboard

透明度播放-可传值(起始透明度,结束透明度)(提升效率)Timeline.DesiredFrameRateProperty.OverrideMetadata(typeof(Timeline), new FrameworkPropertyMetadata { DefaultValue = 20 });

RotateTransformAnimation ( UIElement element, System.TimeSpan aTime, double angle, System.Windows.Media.Animation.RepeatBehavior RForever, Window wind ) : System.Windows.Media.Animation.Storyboard

旋转动画(初始点按元素的中心)(提升效率)Timeline.DesiredFrameRateProperty.OverrideMetadata(typeof(Timeline), new FrameworkPropertyMetadata { DefaultValue = 20 });

RotateTransformAnimation ( UIElement sender, System.TimeSpan aTime, double centerX, double centerY, double angle, System.Windows.Media.Animation.RepeatBehavior RForever, Window wind ) : System.Windows.Media.Animation.Storyboard

旋转动画(初始点X和Y是按元素的左上角)(提升效率)Timeline.DesiredFrameRateProperty.OverrideMetadata(typeof(Timeline), new FrameworkPropertyMetadata { DefaultValue = 20 });

ScaleEasingAnimation ( FrameworkElement element, System.TimeSpan aTime, double dFrom, double dTo, int aOscillations, int aSpringiness ) : System.Windows.Media.Animation.AnimationClock

缓动缩放动画 (提升效率)Timeline.DesiredFrameRateProperty.OverrideMetadata(typeof(Timeline), new FrameworkPropertyMetadata { DefaultValue = 20 });

ScaleTransformAnimation ( UIElement sender, double scaleXF, double scaleXT, double scaleYF, double scaleYT, System.TimeSpan aTime, System.Windows.Media.Animation.RepeatBehavior RForever, Window wind ) : System.Windows.Media.Animation.Storyboard

缩放匀速动画 (提升效率)Timeline.DesiredFrameRateProperty.OverrideMetadata(typeof(Timeline), new FrameworkPropertyMetadata { DefaultValue = 20 });

Method Details

InDouble_X_Animation() public static method

X方向移动动画(需要移动的对象、移动时间、相对控件原始位置的起始位置、相对控件原始位置的结束位置)(提升效率)Timeline.DesiredFrameRateProperty.OverrideMetadata(typeof(Timeline), new FrameworkPropertyMetadata { DefaultValue = 20 });
public static InDouble_X_Animation ( FrameworkElement myFrameworkElement, System.TimeSpan aTime, double dFrom, double dTo, System.Windows.Media.Animation.RepeatBehavior RForever, Window wind ) : System.Windows.Media.Animation.Storyboard
myFrameworkElement System.Windows.FrameworkElement 需要移动的对象
aTime System.TimeSpan 移动时间
dFrom double 相对控件原始位置的-起始位置
dTo double 相对控件原始位置的-结束位置
RForever System.Windows.Media.Animation.RepeatBehavior
wind System.Windows.Window 动画移动所在窗口(推荐this)
return System.Windows.Media.Animation.Storyboard

InDouble_Y_Animation() public static method

Y方向移动动画(需要移动的对象、移动时间、相对控件原始位置的起始位置、相对控件原始位置的结束位置)(提升效率)Timeline.DesiredFrameRateProperty.OverrideMetadata(typeof(Timeline), new FrameworkPropertyMetadata { DefaultValue = 20 });
public static InDouble_Y_Animation ( FrameworkElement myFrameworkElement, System.TimeSpan aTime, double dFrom, double dTo, System.Windows.Media.Animation.RepeatBehavior RForever, Window wind ) : System.Windows.Media.Animation.Storyboard
myFrameworkElement System.Windows.FrameworkElement 需要移动的对象
aTime System.TimeSpan 移动时间
dFrom double 相对控件原始位置的-起始位置
dTo double 相对控件原始位置的-结束位置
RForever System.Windows.Media.Animation.RepeatBehavior
wind System.Windows.Window 动画移动所在窗口(推荐this)
return System.Windows.Media.Animation.Storyboard

Opacity_Animation() public static method

透明度播放—循环 (提升效率)Timeline.DesiredFrameRateProperty.OverrideMetadata(typeof(Timeline), new FrameworkPropertyMetadata { DefaultValue = 20 });
public static Opacity_Animation ( FrameworkElement myFrameworkElement, System.TimeSpan aTime, Window wind ) : System.Windows.Media.Animation.Storyboard
myFrameworkElement System.Windows.FrameworkElement 透明动画对象
aTime System.TimeSpan 动画时间
wind System.Windows.Window 动画移动所在窗口(推荐this)
return System.Windows.Media.Animation.Storyboard

Opacity_Animation() public static method

透明度播放-可传值(起始透明度,结束透明度,次数或是否循环)(提升效率)Timeline.DesiredFrameRateProperty.OverrideMetadata(typeof(Timeline), new FrameworkPropertyMetadata { DefaultValue = 20 });
public static Opacity_Animation ( FrameworkElement myFrameworkElement, System.TimeSpan aTime, double dFrom, double dTo, System.Windows.Media.Animation.RepeatBehavior RBehavior, Window wind ) : System.Windows.Media.Animation.Storyboard
myFrameworkElement System.Windows.FrameworkElement 透明动画对象
aTime System.TimeSpan 动画时间
dFrom double 起始透明度
dTo double 结束透明度
RBehavior System.Windows.Media.Animation.RepeatBehavior 动画是否循环
wind System.Windows.Window 动画移动所在窗口(推荐this)
return System.Windows.Media.Animation.Storyboard

Opacity_Animation() public static method

透明度播放-可传值(起始透明度,结束透明度)(提升效率)Timeline.DesiredFrameRateProperty.OverrideMetadata(typeof(Timeline), new FrameworkPropertyMetadata { DefaultValue = 20 });
public static Opacity_Animation ( FrameworkElement myFrameworkElement, System.TimeSpan aTime, double dFrom, double dTo, Window wind ) : System.Windows.Media.Animation.Storyboard
myFrameworkElement System.Windows.FrameworkElement 透明动画对象
aTime System.TimeSpan 动画时间
dFrom double 起始透明度
dTo double 结束透明度
wind System.Windows.Window 动画移动所在窗口(推荐this)
return System.Windows.Media.Animation.Storyboard

RotateTransformAnimation() public static method

旋转动画(初始点按元素的中心)(提升效率)Timeline.DesiredFrameRateProperty.OverrideMetadata(typeof(Timeline), new FrameworkPropertyMetadata { DefaultValue = 20 });
public static RotateTransformAnimation ( UIElement element, System.TimeSpan aTime, double angle, System.Windows.Media.Animation.RepeatBehavior RForever, Window wind ) : System.Windows.Media.Animation.Storyboard
element UIElement 动画对象
aTime System.TimeSpan 动画时间
angle double 旋转角度(推荐0-360)
RForever System.Windows.Media.Animation.RepeatBehavior
wind System.Windows.Window 动画移动所在窗口(推荐this)
return System.Windows.Media.Animation.Storyboard

RotateTransformAnimation() public static method

旋转动画(初始点X和Y是按元素的左上角)(提升效率)Timeline.DesiredFrameRateProperty.OverrideMetadata(typeof(Timeline), new FrameworkPropertyMetadata { DefaultValue = 20 });
public static RotateTransformAnimation ( UIElement sender, System.TimeSpan aTime, double centerX, double centerY, double angle, System.Windows.Media.Animation.RepeatBehavior RForever, Window wind ) : System.Windows.Media.Animation.Storyboard
sender UIElement 动画对象
aTime System.TimeSpan 动画时间
centerX double 旋转X原点
centerY double 旋转Y原点
angle double 旋转角度(推荐0-360)
RForever System.Windows.Media.Animation.RepeatBehavior
wind System.Windows.Window 动画移动所在窗口(推荐this)
return System.Windows.Media.Animation.Storyboard

ScaleEasingAnimation() public static method

缓动缩放动画 (提升效率)Timeline.DesiredFrameRateProperty.OverrideMetadata(typeof(Timeline), new FrameworkPropertyMetadata { DefaultValue = 20 });
public static ScaleEasingAnimation ( FrameworkElement element, System.TimeSpan aTime, double dFrom, double dTo, int aOscillations, int aSpringiness ) : System.Windows.Media.Animation.AnimationClock
element System.Windows.FrameworkElement 缩放控件
aTime System.TimeSpan 缩放时间
dFrom double 缩放起始值(推荐1)
dTo double 缩放结束值(推荐1.5)
aOscillations int 滑过动画目标的次数(推荐5)
aSpringiness int 弹簧刚度(推荐10)
return System.Windows.Media.Animation.AnimationClock

ScaleTransformAnimation() public static method

缩放匀速动画 (提升效率)Timeline.DesiredFrameRateProperty.OverrideMetadata(typeof(Timeline), new FrameworkPropertyMetadata { DefaultValue = 20 });
public static ScaleTransformAnimation ( UIElement sender, double scaleXF, double scaleXT, double scaleYF, double scaleYT, System.TimeSpan aTime, System.Windows.Media.Animation.RepeatBehavior RForever, Window wind ) : System.Windows.Media.Animation.Storyboard
sender UIElement 缩放控件
scaleXF double 缩放X开始值
scaleXT double 缩放X结束值
scaleYF double 缩放Y开始值
scaleYT double 缩放Y结束值
aTime System.TimeSpan 动画持续时间
RForever System.Windows.Media.Animation.RepeatBehavior
wind System.Windows.Window 动画移动所在窗口(推荐this)
return System.Windows.Media.Animation.Storyboard