當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。