SetStoryboardSpeedRatio 类

定义

用于更改 Storyboard 的速度的触发器操作。A trigger action that changes the speed of a Storyboard.

public ref class SetStoryboardSpeedRatio sealed : System::Windows::Media::Animation::ControllableStoryboardAction
public sealed class SetStoryboardSpeedRatio : System.Windows.Media.Animation.ControllableStoryboardAction
type SetStoryboardSpeedRatio = class
    inherit ControllableStoryboardAction
Public NotInheritable Class SetStoryboardSpeedRatio
Inherits ControllableStoryboardAction
继承

注解

SetStoryboardSpeedRatio 操作与或一起使用 EventTrigger Trigger 以交互方式控制情节提要的速度比。Use a SetStoryboardSpeedRatio action with an EventTrigger or a Trigger to interactively control a storyboard's speed ratio.

使用的 SpeedRatio 属性 SetStoryboardSpeedRatio 将新的 Storyboard 动画速度指定为旧动画速度的比率。Use the SpeedRatio property of SetStoryboardSpeedRatio to specify a new Storyboard animation speed as a ratio of the old animation speed. 例如,如果将设置 SpeedRatio 为2,则会使动画的速度翻倍, Storyboard 如果将值设置为0.5,则会将速度降低50%。For example, if you set the SpeedRatio to 2, you double the speed of the Storyboard animations and if you set a value of 0.5, you reduce the speed by 50 percent.

此对象将在 Storyboard 开始后的任意时间影响 StoryboardThis object affects the Storyboard at anytime after the Storyboard begins. 例如,如果您暂停 Storyboard 并使用,则在 SetStoryboardSpeedRatio 您恢复时 Storyboard ,它将使用新的速度比。For example, if you pause the Storyboard and use the SetStoryboardSpeedRatio, when you resume the Storyboard, it uses the new speed ratio.

PauseStoryboardStoryboard 直接控制。PauseStoryboard does not control a Storyboard directly. 相反, PauseStoryboard 必须引用的 Name BeginStoryboard ,后者控制 StoryboardRather, PauseStoryboard must reference the Name of the BeginStoryboard, which controls the Storyboard.

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

若要能够暂停、继续或以其他 Storyboard 方式控制交互,请设置 Name 其的属性, BeginStoryboard 并使用 ControllableStoryboardAction 对象 (如 PauseStoryboardResumeStoryboardStopStoryboard) 通过引用其来控制它 NameTo be able to pause, resume, or otherwise control a Storyboard interactively, set the Name property of its BeginStoryboard and use 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.

构造函数

SetStoryboardSpeedRatio()

初始化 SetStoryboardSpeedRatio 类的新实例。Initializes a new instance of the SetStoryboardSpeedRatio class.

属性

BeginStoryboardName

获取或设置将你想要的 Storyboard 启动为交互式控制的 BeginStoryboardNameGets or sets the Name of the BeginStoryboard that began the Storyboard you want to interactively control.

(继承自 ControllableStoryboardAction)
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)
IsSealed

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

(继承自 DependencyObject)
SpeedRatio

获取或设置新的 Storyboard 动画速度,该速度以相对于旧动画速度的比率值表示。Gets or sets a new Storyboard animation speed as a ratio of the old animation speed.

方法

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)

适用于

另请参阅