• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Animation.AnimationClock类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中System.Windows.Media.Animation.AnimationClock的典型用法代码示例。如果您正苦于以下问题:C# AnimationClock类的具体用法?C# AnimationClock怎么用?C# AnimationClock使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



AnimationClock类属于System.Windows.Media.Animation命名空间,在下文中一共展示了AnimationClock类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: PointAnimationClockResource

 /// <summary>
 /// Constructor for public PointAnimationClockResource.
 /// This constructor accepts the base value and AnimationClock.
 /// Note that since there is no current requirement that we be able to set or replace either the
 /// base value or the AnimationClock, this is the only way to initialize an instance of
 /// PointAnimationClockResource.
 /// Also, we currently Assert that the resource is non-null, since without mutability
 /// such a resource isn't needed.
 /// We can easily extend this class if/when new requirements arise.
 /// </summary>
 /// <param name="baseValue"> Point - The base value. </param>
 /// <param name="animationClock"> AnimationClock - cannot be null. </param>
 public PointAnimationClockResource(
     Point baseValue,
     AnimationClock animationClock
     ): base( animationClock )
 {
     _baseValue = baseValue;
 }
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:19,代码来源:PointAnimationClockResource.cs


示例2: RectAnimationClockResource

 /// <summary>
 /// Constructor for public RectAnimationClockResource.
 /// This constructor accepts the base value and AnimationClock.
 /// Note that since there is no current requirement that we be able to set or replace either the
 /// base value or the AnimationClock, this is the only way to initialize an instance of
 /// RectAnimationClockResource.
 /// Also, we currently Assert that the resource is non-null, since without mutability
 /// such a resource isn't needed.
 /// We can easily extend this class if/when new requirements arise.
 /// </summary>
 /// <param name="baseValue"> Rect - The base value. </param>
 /// <param name="animationClock"> AnimationClock - cannot be null. </param>
 public RectAnimationClockResource(
     Rect baseValue,
     AnimationClock animationClock
     ): base( animationClock )
 {
     _baseValue = baseValue;
 }
开发者ID:JianwenSun,项目名称:cc,代码行数:19,代码来源:RectAnimationClockResource.cs


示例3: SizeAnimationClockResource

 /// <summary> 
 /// Constructor for public SizeAnimationClockResource. 
 /// This constructor accepts the base value and AnimationClock.
 /// Note that since there is no current requirement that we be able to set or replace either the 
 /// base value or the AnimationClock, this is the only way to initialize an instance of
 /// SizeAnimationClockResource.
 /// Also, we currently Assert that the resource is non-null, since without mutability
 /// such a resource isn't needed. 
 /// We can easily extend this class if/when new requirements arise.
 /// </summary> 
 /// <param name="baseValue"> Size - The base value. </param> 
 /// <param name="animationClock"> AnimationClock - cannot be null. </param>
 public SizeAnimationClockResource( 
     Size baseValue,
     AnimationClock animationClock
     ): base( animationClock )
 { 
     _baseValue = baseValue;
 } 
开发者ID:sjyanxin,项目名称:WPFSource,代码行数:19,代码来源:SizeAnimationClockResource.cs


示例4: Init

        public void Init(MyModel mm)
        {
            this.mm = mm;

            Transform3DGroup t3dg = (Transform3DGroup)this.mm.m3dg.Transform;
            RotateTransform3D rtx = (RotateTransform3D)t3dg.Children[2];
            AxisAngleRotation3D aar3dx = (AxisAngleRotation3D)rtx.Rotation;
            RotateTransform3D rty = (RotateTransform3D)t3dg.Children[3];
            AxisAngleRotation3D aar3dy = (AxisAngleRotation3D)rty.Rotation;
            RotateTransform3D rtz = (RotateTransform3D)t3dg.Children[4];
            AxisAngleRotation3D aar3dz = (AxisAngleRotation3D)rtz.Rotation;

            DoubleAnimation dax = new DoubleAnimation(360, new Duration(new TimeSpan(0, 0, 10)));
            dax.RepeatBehavior = RepeatBehavior.Forever;
            //aar3dx.BeginAnimation(AxisAngleRotation3D.AngleProperty, dax);
            clockx = dax.CreateClock();

            DoubleAnimation day = new DoubleAnimation(360, new Duration(new TimeSpan(0, 0, 5)));
            day.RepeatBehavior = RepeatBehavior.Forever;
            clocky = day.CreateClock();

            DoubleAnimation daz = new DoubleAnimation(360, new Duration(new TimeSpan(0, 0, 5)));
            daz.RepeatBehavior = RepeatBehavior.Forever;
            clockz = daz.CreateClock();

            aar3dx.ApplyAnimationClock(AxisAngleRotation3D.AngleProperty, clockx);
            aar3dy.ApplyAnimationClock(AxisAngleRotation3D.AngleProperty, clocky);
            aar3dz.ApplyAnimationClock(AxisAngleRotation3D.AngleProperty, clockx);
            clockx.Controller.Begin();
            clocky.Controller.Begin();
            clockz.Controller.Begin();
        }
开发者ID:pyephyomaung,项目名称:som-ar,代码行数:32,代码来源:StarAnimated.cs


示例5: DoubleAnimationClockResource

 /// <summary>
 /// Constructor for public DoubleAnimationClockResource.
 /// This constructor accepts the base value and AnimationClock.
 /// Note that since there is no current requirement that we be able to set or replace either the
 /// base value or the AnimationClock, this is the only way to initialize an instance of
 /// DoubleAnimationClockResource.
 /// Also, we currently Assert that the resource is non-null, since without mutability
 /// such a resource isn't needed.
 /// We can easily extend this class if/when new requirements arise.
 /// </summary>
 /// <param name="baseValue"> Double - The base value. </param>
 /// <param name="animationClock"> AnimationClock - cannot be null. </param>
 public DoubleAnimationClockResource(
     Double baseValue,
     AnimationClock animationClock
     ): base( animationClock )
 {
     _baseValue = baseValue;
 }
开发者ID:JianwenSun,项目名称:cc,代码行数:19,代码来源:DoubleAnimationClockResource.cs


示例6: GetCurrentValue

 public override object GetCurrentValue(object defaultOriginValue, 
     object defaultDestinationValue,
     AnimationClock animationClock)
 {
     TimeSpan? current = animationClock.CurrentTime;
     Double increase = _to - _from;
     return _from + (increase / ((Double)Duration.TimeSpan.Ticks / (Double)current.Value.Ticks));
 }
开发者ID:powernick,项目名称:CodeLib,代码行数:8,代码来源:Second.xaml.cs


示例7: GetCurrentValueCore

 protected override double GetCurrentValueCore(double defaultOriginValue, double defaultDestinationValue, AnimationClock animationClock)
 {
     double time = animationClock.CurrentTime.HasValue ? animationClock.CurrentTime.Value.TotalMilliseconds : 0.0;
     double from = this.From.HasValue ? this.From.Value : defaultOriginValue;
     double to = this.To.HasValue ? this.To.Value : defaultDestinationValue;
     double delta = to - from;
     double duration = this.Duration.TimeSpan.TotalMilliseconds;
     return CalculateCurrentValue(time, from, delta, duration);
 }
开发者ID:fr0,项目名称:Orion,代码行数:9,代码来源:EasingDoubleAnimation.cs


示例8: Add

    public void Add(AnimationClock clock)
    {
      if (clock == null)
      {
        throw new ArgumentNullException("clock");
      }

      List.Add(clock);
    }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:9,代码来源:AnimationClockCollection.cs


示例9: Contains

    public bool Contains(AnimationClock clock)
    {
      if (clock == null)
      {
        throw new ArgumentNullException("clock");
      }

      return List.Contains(clock);
    }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:9,代码来源:AnimationClockCollection.cs


示例10: DrawLine

 /// <summary>
 ///     DrawLine - 
 ///     Draws a line with the specified pen.
 ///     Note that this API does not accept a Brush, as there is no area to fill.
 /// </summary>
 /// <param name="pen"> The Pen with which to stroke the line. </param>
 /// <param name="point0"> The start Point for the line. </param>
 /// <param name="point0Animations"> Optional AnimationClock for point0. </param>
 /// <param name="point1"> The end Point for the line. </param>
 /// <param name="point1Animations"> Optional AnimationClock for point1. </param>
 public override void DrawLine(
     Pen pen,
     Point point0,
     AnimationClock point0Animations,
     Point point1,
     AnimationClock point1Animations)
 {
     Debug.Assert(false);
 }
开发者ID:JianwenSun,项目名称:cc,代码行数:19,代码来源:DrawingContextWalker.cs


示例11: CopyTo

    public void CopyTo(AnimationClock[] array, int arrayIndex)
    {
      if (array == null)
      {
        throw new ArgumentNullException("array");
      }

      List.CopyTo(array, arrayIndex);
    }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:9,代码来源:AnimationClockCollection.cs


示例12: IndexOf

    public int IndexOf(AnimationClock clock)
    {
      if (clock == null)
      {
        throw new ArgumentNullException("clock");
      }

      return List.IndexOf(clock);
    }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:9,代码来源:AnimationClockCollection.cs


示例13: Insert

    public void Insert(int index, AnimationClock clock)
    {
      if (clock == null)
      {
        throw new ArgumentNullException("clock");
      }

      List.Insert(index, clock);
    }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:9,代码来源:AnimationClockCollection.cs


示例14: AnimationClockResource

        /// <summary> 
        /// Protected constructor for AnimationClockResource.
        /// The derived class must provide a created duceResource.
        /// </summary>
        /// <param name="animationClock"> The AnimationClock for this resource.  Can be null. </param> 
        protected AnimationClockResource(AnimationClock animationClock)
        { 
            _animationClock = animationClock; 

            if (_animationClock != null) 
            {
                _animationClock.CurrentTimeInvalidated += new EventHandler(OnChanged);
            }
        } 
开发者ID:sjyanxin,项目名称:WPFSource,代码行数:14,代码来源:AnimationClockResource.cs


示例15: AnimationException

        //------------------------------------------------------
        //
        //  Constructors
        //
        //------------------------------------------------------

        #region Constructors

        /// <summary>
        /// Internal Constructor
        /// </summary>
        /// <param name="clock"></param>
        /// <param name="property"></param>
        /// <param name="target"></param>
        /// <param name="message"></param>
        /// <param name="innerException"></param>
        internal AnimationException(
            AnimationClock clock, DependencyProperty property, IAnimatable target,
            string message, Exception innerException)
            : base(message, innerException)
        {
            _clock = clock;
            _property = property;
            _targetElement = target;
        }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:25,代码来源:AnimationException.cs


示例16: GetCurrentValue

        public override object GetCurrentValue(object defaultOriginValue, object defaultDestinationValue, AnimationClock animationClock)
        {
            double fromVal = ((GridLength)GetValue(GridLengthAnimation.FromProperty)).Value;
            double toVal = ((GridLength)GetValue(GridLengthAnimation.ToProperty)).Value;

            if (fromVal > toVal)
                return new GridLength((1 - animationClock.CurrentProgress.Value) * (fromVal - toVal) + toVal, GridUnitType.Star);
            else
                return new GridLength(animationClock.CurrentProgress.Value * (toVal - fromVal) + fromVal, GridUnitType.Star);
        }
开发者ID:JvJefke,项目名称:FestivalManagerFinal,代码行数:10,代码来源:GridLengthAnimations.cs


示例17: GetCurrentValueCore

		protected override Point3DCollection GetCurrentValueCore(Point3DCollection defaultOriginValue,
		                                                         Point3DCollection defaultDestinationValue,
		                                                         AnimationClock animationClock)
		{
			double progress = animationClock.CurrentProgress.Value;
			if (progress <= 0.0)
			{
				Initialize();
			}
			return GetMeshPositions(progress);
		}
开发者ID:Ghawken,项目名称:FrontView,代码行数:11,代码来源:GenieAnimation.cs


示例18: GetCurrentValue

        public Point3DCollection GetCurrentValue(Point3DCollection defaultOriginValue,
		                                         Point3DCollection defaultDestinationValue,
		                                         AnimationClock animationClock)
        {
            if (animationClock == null)
            {
                throw new ArgumentException("animationClock");
            }

            return GetCurrentValueCore(defaultOriginValue, defaultDestinationValue, animationClock);
        }
开发者ID:GroupXTech,项目名称:Yatse2,代码行数:11,代码来源:Point3DCollectionAnimationBase.cs


示例19: GetCurrentValue

        public override object GetCurrentValue(object defaultOriginValue,
            object defaultDestinationValue, AnimationClock animationClock)
        {
            var fromVal = ((GridLength)GetValue(FromProperty)).Value;
            var toVal = ((GridLength)GetValue(ToProperty)).Value;

            return fromVal > toVal
                       ? new GridLength((1 - animationClock.CurrentProgress.Value)*(fromVal - toVal) + toVal,
                                        GridUnitType.Star)
                       : new GridLength(animationClock.CurrentProgress.Value*(toVal - fromVal) + fromVal,
                                        GridUnitType.Star);
        }
开发者ID:rombolshak,项目名称:Requc,代码行数:12,代码来源:GridLengthAnimation.cs


示例20: GetCurrentValue

 /// <summary>
 /// Calculates the value this animation believes should be the current value for the property.
 /// </summary>
 /// <param name="defaultOriginValue">
 /// This value is the suggested origin value provided to the animation
 /// to be used if the animation does not have its own concept of a
 /// start value. If this animation is the first in a composition chain
 /// this value will be the snapshot value if one is available or the
 /// base property value if it is not; otherise this value will be the 
 /// value returned by the previous animation in the chain with an 
 /// animationClock that is not Stopped.
 /// </param>
 /// <param name="defaultDestinationValue">
 /// This value is the suggested destination value provided to the animation
 /// to be used if the animation does not have its own concept of an
 /// end value. This value will be the base value if the animation is
 /// in the first composition layer of animations on a property; 
 /// otherwise this value will be the output value from the previous 
 /// composition layer of animations for the property.
 /// </param>
 /// <param name="animationClock">
 /// This is the animationClock which can generate the CurrentTime or
 /// CurrentProgress value to be used by the animation to generate its
 /// output value.
 /// </param>
 /// <returns>
 /// The value this animation believes should be the current value for the property.
 /// </returns>
 public override sealed object GetCurrentValue(object defaultOriginValue, object defaultDestinationValue, AnimationClock animationClock)
 {
     // Verify that object arguments are non-null since we are a value type
     if (defaultOriginValue == null)
     {
         throw new ArgumentNullException("defaultOriginValue");
     }
     if (defaultDestinationValue == null)
     {
         throw new ArgumentNullException("defaultDestinationValue");
     }
     return GetCurrentValue((CornerRadius)defaultOriginValue, (CornerRadius)defaultDestinationValue, animationClock);
 }
开发者ID:grandtiger,项目名称:wpf-shell,代码行数:41,代码来源:CornerRadiusAnimationBase.cs



注:本文中的System.Windows.Media.Animation.AnimationClock类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Animation.BeginStoryboard类代码示例发布时间:2022-05-26
下一篇:
C# Media.VisualBrush类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap