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


C# Transform.BeginAnimation方法代码示例

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


在下文中一共展示了Transform.BeginAnimation方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: StartAnimation

        public static void StartAnimation (Transform animatableElement, DependencyProperty dependencyProperty, double toValue, double durationMilliseconds, double accelerationRatio, double decelerationRatio)
        {
            DoubleAnimation animation = new DoubleAnimation();
            animation.To = toValue;
            animation.AccelerationRatio = accelerationRatio;
            animation.DecelerationRatio = decelerationRatio;
            animation.FillBehavior = FillBehavior.HoldEnd;
            animation.Duration = TimeSpan.FromMilliseconds(durationMilliseconds);
            animation.Freeze();

            animatableElement.BeginAnimation(dependencyProperty, animation, HandoffBehavior.Compose);
        }
开发者ID:BdGL3,项目名称:CXPortal,代码行数:12,代码来源:AnimationHelper.cs

示例2: MoveItems

 private void MoveItems(Transform form, TimeSpan span)
 {
     DoubleAnimation animation = new DoubleAnimation();
     animation.To = 0;
     animation.Duration = span;
     form.BeginAnimation(TranslateTransform.YProperty, animation);
 }
开发者ID:WindAzure,项目名称:DataBase,代码行数:7,代码来源:IngredientImagePanel.xaml.cs

示例3: _BeginAnimateContentReplacement

        /// <summary>
        /// Führt die Animation für beide Contents aus
        /// </summary>
        private void _BeginAnimateContentReplacement()
        {
            OldContentTransform = new TranslateTransform();
            NewContentTransform = new TranslateTransform();

            _paintArea.Visibility = Visibility.Visible;
            _paintArea.RenderTransform = OldContentTransform;
            _mainContent.RenderTransform = NewContentTransform;

            IEasingFunction ease = new BackEase {
                Amplitude = 0.5,
                EasingMode = EasingMode.EaseInOut
            };

            NewContentTransform.BeginAnimation(TranslateTransform.XProperty, AnimateLib.CreateAnimation(this.ActualWidth, 0, 0, 1, ease));
            OldContentTransform.BeginAnimation(TranslateTransform.XProperty, AnimateLib.CreateAnimation(0, -this.ActualWidth, 0, 1, ease, (s, e) => {
                _paintArea.Visibility = Visibility.Hidden;
            }));
        }
开发者ID:CodefoundryDE,项目名称:ViennaTrafficMonitor,代码行数:22,代码来源:WindowAnimationControl.cs


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