当前位置: 首页>>代码示例>>C#>>正文


C# Animation.AnimationClock类代码示例

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


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


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