BeginStoryboard 类

定义

一个触发器操作,该操作开始 Storyboard 并将其动画分配到目标对象和属性。A trigger action that begins a Storyboard and distributes its animations to their targeted objects and properties.

public ref class BeginStoryboard sealed : System::Windows::TriggerAction
[System.Windows.Markup.ContentProperty("Storyboard")]
[System.Windows.Markup.RuntimeNameProperty("Name")]
public sealed class BeginStoryboard : System.Windows.TriggerAction
[<System.Windows.Markup.ContentProperty("Storyboard")>]
[<System.Windows.Markup.RuntimeNameProperty("Name")>]
type BeginStoryboard = class
    inherit TriggerAction
Public NotInheritable Class BeginStoryboard
Inherits TriggerAction
继承
属性

注解

使用 BeginStoryboard 带有 EventTrigger 或的操作 Trigger 将动画应用于其目标属性并启动它们。Use a BeginStoryboard action with an EventTrigger or a Trigger to apply animations to their target properties and start them. BeginStoryboardStoryboard Begin 触发时通过对其引用调用来开始 StoryboardBeginStoryboard begins a Storyboard by calling Begin on its Storyboard reference when triggered.

当你 Storyboard 在已由另一个进行动画处理的属性上开始时 Storyboard ,的 HandoffBehavior 属性将 BeginStoryboard 确定动画的执行方式。When you begin a Storyboard on a property that is already being animated by another Storyboard, the HandoffBehavior property of BeginStoryboard determines how the animation proceeds.

以交互方式暂停、继续、停止或以其他方式控制情节提要Pause, Resume, Stop, or Otherwise Control a Storyboard Interactively

若要能够暂停、继续或以 Storyboard 交互方式控制在标记中声明的,则必须设置 Name 其的属性 BeginStoryboardTo be able to pause, resume, or otherwise control a Storyboard that was declared in markup interactively, you must set the Name property of its BeginStoryboard. 然后,你可以通过 Storyboard 使用 ControllableStoryboardAction 对象 (如 PauseStoryboardResumeStoryboardStopStoryboard) 通过引用其来控制该对象 NameYou can then control the Storyboard by using a ControllableStoryboardAction object (such as PauseStoryboard, ResumeStoryboard, or StopStoryboard) to control it by referencing its Name. 如果 Name 的未 BeginStoryboard 指定,则 Storyboard 不能在开始后以交互方式控制。If the Name of BeginStoryboard is unspecified, the Storyboard cannot be interactively controlled after it is begun. 有关详细信息,请参阅 如何:在演示图板启动后使用事件触发器控制情节提要See How to: Use Event Triggers to Control a Storyboard After It Starts for more information.

备注

在代码中,可以使用类的交互式方法 Storyboard 来控制 Storyboard 使用应用的 BeginStoryboardIn code, you may use the interactive methods of the Storyboard class to control a Storyboard that was applied using a BeginStoryboard. 与使用对象时一样 ControllableStoryboardAction ,你必须为 BeginStoryboard 其提供一个名称才能以 Storyboard 交互方式控制。As is the case when using ControllableStoryboardAction objects, you must give the BeginStoryboard a name for its Storyboard to be interactively controllable.

构造函数

BeginStoryboard()

创建 BeginStoryboard 类的新实例。Creates a new instance of the BeginStoryboard class.

字段

StoryboardProperty

标识 Storyboard 依赖项属性。Identifies the Storyboard dependency property.

属性

DependencyObjectType

获取 DependencyObjectType 包装此实例的 CLR 类型的。Gets the DependencyObjectType that wraps the CLR type of this instance.

(继承自 DependencyObject)
Dispatcher

获取与此 Dispatcher 关联的 DispatcherObjectGets the Dispatcher this DispatcherObject is associated with.

(继承自 DispatcherObject)
HandoffBehavior

获取或设置正确的提交行为以启动此情节提要中的动画时钟。Gets or sets the proper hand-off behavior to start an animation clock in this storyboard.

IsSealed

获取一个值,该值指示此实例当前是否为密封的(只读)。Gets a value that indicates whether this instance is currently sealed (read-only).

(继承自 DependencyObject)
Name

获取或设置 BeginStoryboard 对象的名称。Gets or sets the name of the BeginStoryboard object. 通过命名 BeginStoryboard 对象,可在 Storyboard 启动后对其进行控制。By naming the BeginStoryboard object, the Storyboard can be controlled after it is started.

Storyboard

获取或设置此 BeginStoryboard 启动的 StoryboardGets or sets the Storyboard that this BeginStoryboard starts.

方法

CheckAccess()

确定调用线程是否可以访问此 DispatcherObjectDetermines whether the calling thread has access to this DispatcherObject.

(继承自 DispatcherObject)
ClearValue(DependencyProperty)

清除属性的本地值。Clears the local value of a property. 要清除的属性由 DependencyProperty 标识符指定。The property to be cleared is specified by a DependencyProperty identifier.

(继承自 DependencyObject)
ClearValue(DependencyPropertyKey)

清除只读属性的本地值。Clears the local value of a read-only property. 要清除的属性由 DependencyPropertyKey 指定。The property to be cleared is specified by a DependencyPropertyKey.

(继承自 DependencyObject)
CoerceValue(DependencyProperty)

对指定依赖属性的值进行强制。Coerces the value of the specified dependency property. 通过对调用方 DependencyObject 上存在的依赖属性的属性元数据中所指定的任何 CoerceValueCallback 函数进行调用来完成此操作。This is accomplished by invoking any CoerceValueCallback function specified in property metadata for the dependency property as it exists on the calling DependencyObject.

(继承自 DependencyObject)
Equals(Object)

确定提供的 DependencyObject 是否等效于当前 DependencyObjectDetermines whether a provided DependencyObject is equivalent to the current DependencyObject.

(继承自 DependencyObject)
GetHashCode()

获取此 DependencyObject 的哈希代码。Gets a hash code for this DependencyObject.

(继承自 DependencyObject)
GetLocalValueEnumerator()

创建一个专用的枚举数,用于确定哪些依赖项属性在此 DependencyObject 上具有以本地方式设置的值。Creates a specialized enumerator for determining which dependency properties have locally set values on this DependencyObject.

(继承自 DependencyObject)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
GetValue(DependencyProperty)

DependencyObject 的此实例返回依赖属性的当前有效值。Returns the current effective value of a dependency property on this instance of a DependencyObject.

(继承自 DependencyObject)
InvalidateProperty(DependencyProperty)

重新评估指定依赖属性的有效值。Re-evaluates the effective value for the specified dependency property.

(继承自 DependencyObject)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
OnPropertyChanged(DependencyPropertyChangedEventArgs)

每当更新此 DependencyObject 的任何依赖属性的有效值时调用。Invoked whenever the effective value of any dependency property on this DependencyObject has been updated. 更改的特定依赖属性将在事件数据中报告。The specific dependency property that changed is reported in the event data.

(继承自 DependencyObject)
ReadLocalValue(DependencyProperty)

如果存在,则返回依赖属性的本地值。Returns the local value of a dependency property, if it exists.

(继承自 DependencyObject)
SetCurrentValue(DependencyProperty, Object)

设置依赖属性的值而不更改其值源。Sets the value of a dependency property without changing its value source.

(继承自 DependencyObject)
SetValue(DependencyProperty, Object)

设置依赖属性的本地值,该值由其依赖属性标识符指定。Sets the local value of a dependency property, specified by its dependency property identifier.

(继承自 DependencyObject)
SetValue(DependencyPropertyKey, Object)

设置一个只读依赖属性的本地值,该值由依赖属性的 DependencyPropertyKey 标识符指定。Sets the local value of a read-only dependency property, specified by the DependencyPropertyKey identifier of the dependency property.

(继承自 DependencyObject)
ShouldSerializeProperty(DependencyProperty)

返回一个值,该值指示序列化进程是否应序列化所提供的依赖属性的值。Returns a value that indicates whether serialization processes should serialize the value for the provided dependency property.

(继承自 DependencyObject)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)
VerifyAccess()

强制调用线程具有此 DispatcherObject 的访问权限。Enforces that the calling thread has access to this DispatcherObject.

(继承自 DispatcherObject)

适用于

另请参阅