本文整理汇总了C#中System.Windows.Shapes.Ellipse.animate方法的典型用法代码示例。如果您正苦于以下问题:C# Ellipse.animate方法的具体用法?C# Ellipse.animate怎么用?C# Ellipse.animate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Shapes.Ellipse
的用法示例。
在下文中一共展示了Ellipse.animate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: bubbleClicked
private void bubbleClicked(object s, MouseButtonEventArgs e)
{
var shellSize = ROOT_explosion.RenderSize.Largest() * 2;
var bubble = s.RequireType<Ellipse>();
lastSelectedTheme = bubble.Tag.RequireType<AccentedMaterialSet>();
var cursor = Mouse.GetPosition(ROOT_explosion);
var explosionBubble = new Ellipse()
{
Width = 1,
Height = 1,
Fill = bubble.Fill,
HorizontalAlignment = HorizontalAlignment.Left,
VerticalAlignment = VerticalAlignment.Top,
//RenderTransformOrigin = new Point(.5, .5),
Margin = new Thickness(cursor.X, cursor.Y, 0, 0),
RenderTransform = new ScaleTransform(1, 1, .5, .5)
};
ROOT_explosion.Children.Add(explosionBubble);
//bubble.RenderTransform.animate(ScaleTransform.ScaleXProperty, 400, 1, 0, new BackEase
// { EasingMode = EasingMode.EaseInOut, Amplitude = .3}, by:1.2);
//bubble.RenderTransform.animate(ScaleTransform.ScaleYProperty, 400, 1, 0, new BackEase
// { EasingMode = EasingMode.EaseInOut, Amplitude = .3}, by:1.2);
explosionBubble.RenderTransform.animate(ScaleTransform.ScaleXProperty, 400, shellSize, 0, new BackEase
{ EasingMode = EasingMode.EaseInOut, Amplitude = .3});
explosionBubble.RenderTransform.animate(ScaleTransform.ScaleYProperty, 400, shellSize , 0, new BackEase
{ EasingMode = EasingMode.EaseInOut, Amplitude = .3}, OnExplode);
explosionBubble.animate(OpacityProperty, 200, 0, 500, new CubicEase
{ EasingMode = EasingMode.EaseIn}, OnExplodeComplete);
}