wpf Visibility 动画
2021-06-23 23:04
标签:targe triggers csdn corn post clipboard strong 实现 nbsp XAML实现: 后台实现: wpf Visibility 动画 标签:targe triggers csdn corn post clipboard strong 实现 nbsp 原文地址:https://www.cnblogs.com/robertyao/p/10182979.html
ObjectAnimationUsingKeyFrames animate = new ObjectAnimationUsingKeyFrames();
animate.Duration = new TimeSpan(0,0,4);
animate.RepeatBehavior = RepeatBehavior.Forever;
DiscreteObjectKeyFrame kf1 = new DiscreteObjectKeyFrame(Visibility.Visible, new TimeSpan(0, 0, 1));
DiscreteObjectKeyFrame kf2 = new DiscreteObjectKeyFrame(Visibility.Hidden, new TimeSpan(0, 0, 2));
DiscreteObjectKeyFrame kf3 = new DiscreteObjectKeyFrame(Visibility.Collapsed, new TimeSpan(0, 0,3));
animate.KeyFrames.Add(kf1);
animate.KeyFrames.Add(kf2);
animate.KeyFrames.Add(kf3);
Bord11.BeginAnimation(Border.VisibilityProperty, animate);
上一篇:web源码泄露