AnimationExtensions.AbortAnimation(IAnimatable, String) 方法

定义

停止动画。

public:
[System::Runtime::CompilerServices::Extension]
 static bool AbortAnimation(Microsoft::Maui::Controls::IAnimatable ^ self, System::String ^ handle);
public static bool AbortAnimation (this Microsoft.Maui.Controls.IAnimatable self, string handle);
static member AbortAnimation : Microsoft.Maui.Controls.IAnimatable * string -> bool
<Extension()>
Public Function AbortAnimation (self As IAnimatable, handle As String) As Boolean

参数

self
IAnimatable

将对其运行此方法的对象。

handle
String

动画持续时间内,在其同级和父级动画中必须唯一的动画键。

返回

注解

如果 handle 引用属于此 IAnimatable 实例的动画,则删除其 tweener 处理程序、停止 tweener、从此 IAnimatable 实例中删除动画,并将其标记为已完成。 如果 handle 引用属于此 IAnimatable 实例的动能之一,则会删除它及其刻度线。

适用于