FrameworkContentElement.BeginStoryboard Methode
Definition
Startet die Sequenz von Aktionen, die im bereitgestellten Storyboard enthalten ist.Begins the sequence of actions that are contained in the provided storyboard.
Überlädt
BeginStoryboard(Storyboard) |
Startet die Sequenz von Aktionen, die im bereitgestellten Storyboard enthalten ist.Begins the sequence of actions that are contained in the provided storyboard. |
BeginStoryboard(Storyboard, HandoffBehavior) |
Startet die Sequenz von Aktionen, die im bereitgestellten Storyboard enthalten ist. Die angegebenen Optionen legen fest, welche Aktion ausgeführt werden soll, wenn die Eigenschaft bereits animiert ist.Begins the sequence of actions that are contained in the provided storyboard, with options specified for what should occur if the property is already animated. |
BeginStoryboard(Storyboard, HandoffBehavior, Boolean) |
Startet die Sequenz von Aktionen, die im bereitgestellten Storyboard enthalten ist, im angegebenen Zustand für das Steuerelement der Animation nach deren Start.Begins the sequence of actions that are contained in the provided storyboard, with specified state for control of the animation after it is started. |
BeginStoryboard(Storyboard)
Startet die Sequenz von Aktionen, die im bereitgestellten Storyboard enthalten ist.Begins the sequence of actions that are contained in the provided storyboard.
public:
void BeginStoryboard(System::Windows::Media::Animation::Storyboard ^ storyboard);
public void BeginStoryboard (System.Windows.Media.Animation.Storyboard storyboard);
member this.BeginStoryboard : System.Windows.Media.Animation.Storyboard -> unit
Public Sub BeginStoryboard (storyboard As Storyboard)
Parameter
- storyboard
- Storyboard
Das zu startende Storyboard.The storyboard to begin.
Hinweise
Bei den Signaturen, die den-Parameter, den-Parameter oder den-Parameter nicht verwenden, isControllable
false
werden die der Animation zugeordneten Zeitachsen Uhren entfernt, sobald der "Fill"-Zeitraum erreicht ist.For the signatures that do not use the isControllable
, parameter, or when that parameter is specified false
, the timeline clocks associated with the animation are removed as soon as it reaches the "Fill" period. Daher kann die Animation nicht neu gestartet werden, nachdem Sie einmal ausgeführt wurde.Therefore the animation cannot be restarted after being run once. Beachten Sie, dass das Steuern einer Animation auch erfordert, dass das Storyboard als eine Instanz im Code benannt oder zugänglich ist.Note that controlling an animation also requires that the storyboard be named or accessible as an instance in code.
Gilt für:
BeginStoryboard(Storyboard, HandoffBehavior)
Startet die Sequenz von Aktionen, die im bereitgestellten Storyboard enthalten ist. Die angegebenen Optionen legen fest, welche Aktion ausgeführt werden soll, wenn die Eigenschaft bereits animiert ist.Begins the sequence of actions that are contained in the provided storyboard, with options specified for what should occur if the property is already animated.
public:
void BeginStoryboard(System::Windows::Media::Animation::Storyboard ^ storyboard, System::Windows::Media::Animation::HandoffBehavior handoffBehavior);
public void BeginStoryboard (System.Windows.Media.Animation.Storyboard storyboard, System.Windows.Media.Animation.HandoffBehavior handoffBehavior);
member this.BeginStoryboard : System.Windows.Media.Animation.Storyboard * System.Windows.Media.Animation.HandoffBehavior -> unit
Public Sub BeginStoryboard (storyboard As Storyboard, handoffBehavior As HandoffBehavior)
Parameter
- storyboard
- Storyboard
Das zu startende Storyboard.The storyboard to begin.
- handoffBehavior
- HandoffBehavior
Ein Wert der Enumeration zum Beschreiben der auszuführenden Aktion, wenn eine im Storyboard beschriebene Eigenschaft bereits animiert ist.A value of the enumeration that describes behavior to use if a property described in the storyboard is already animated.
Hinweise
Bei den Signaturen, die den-Parameter, den-Parameter oder den-Parameter nicht verwenden, isControllable
false
werden die der Animation zugeordneten Zeitachsen Uhren entfernt, sobald der "Fill"-Zeitraum erreicht ist.For the signatures that do not use the isControllable
, parameter, or when that parameter is specified false
, the timeline clocks associated with the animation are removed as soon as it reaches the "Fill" period. Daher kann die Animation nicht neu gestartet werden, nachdem Sie einmal ausgeführt wurde.Therefore the animation cannot be restarted after being run once. Beachten Sie, dass das Steuern einer Animation auch erfordert, dass das Storyboard als eine Instanz im Code benannt oder zugänglich ist.Note that controlling an animation also requires that the storyboard be named or accessible as an instance in code.
Verwenden von Compose HandoffBehaviorUsing the Compose HandoffBehavior
Wenn Sie Storyboard , AnimationTimeline oder AnimationClock auf eine Eigenschaft mithilfe von anwenden Compose HandoffBehavior , Clock verbrauchen alle Objekte, die dieser Eigenschaft zuvor zugeordnet sind, weiterhin Systemressourcen. das Zeit Steuerungssystem entfernt die Uhren nicht automatisch.When you apply a Storyboard, AnimationTimeline, or AnimationClock to a property by using the Compose HandoffBehavior, any Clock objects previously associated with that property continue to consume system resources; the timing system does not remove the clocks automatically.
Um Leistungsprobleme zu vermeiden, wenn Sie eine große Anzahl von Uhren mithilfe von anwenden Compose , sollten Sie das Verfassen von Uhren aus der animierten Eigenschaft entfernen, nachdem Sie fertiggestellt wurden.To avoid performance issues when you apply a large number of clocks by using Compose, you should remove composing clocks from the animated property after they complete. Es gibt mehrere Möglichkeiten, eine Uhr zu entfernen:There are several ways to remove a clock:
Um alle Uhren aus einer Eigenschaft zu entfernen, verwenden Sie die- ApplyAnimationClock(DependencyProperty, AnimationClock) BeginAnimation(DependencyProperty, AnimationTimeline) Methode oder die-Methode des animierten Objekts.To remove all clocks from a property, use the ApplyAnimationClock(DependencyProperty, AnimationClock) or BeginAnimation(DependencyProperty, AnimationTimeline) method of the animated object. Geben Sie die zu animierende Eigenschaft als ersten Parameter und
null
als Sekunde an.Specify the property being animated as the first parameter, andnull
as the second. Dadurch werden alle Animations Uhren aus der-Eigenschaft entfernt.This removes all animation clocks from the property.Um einen bestimmten AnimationClock aus einer Liste von Uhren zu entfernen, verwenden Controller Sie die-Eigenschaft des, AnimationClock um eine abzurufen ClockController , und rufen Sie dann die- Remove Methode von auf ClockController .To remove a specific AnimationClock from a list of clocks, use the Controller property of the AnimationClock to retrieve a ClockController, then call the Remove method of the ClockController. Dies erfolgt in der Regel im Completed Ereignishandler für eine Uhr.This is typically done in the Completed event handler for a clock. Beachten Sie, dass nur Stamm Uhren von einem gesteuert werden können ClockController ; die- Controller Eigenschaft einer untergeordneten Uhr gibt zurück
null
.Note that only root clocks can be controlled by a ClockController; the Controller property of a child clock returnsnull
. Beachten Sie auch, dass das- Completed Ereignis nicht ausgelöst wird, wenn die effektive Dauer der Uhr ewig ist.Note also that the Completed event is not raised if the effective duration of the clock is forever. In diesem Fall muss der Benutzer bestimmen, wann aufgerufen werden soll Remove .In that case, the user must determine when to call Remove.
Dies betrifft hauptsächlich Animationen für Objekte, die eine lange Lebensdauer haben.This is primarily an issue for animations on objects that have a long lifetime. Wenn für ein Objekt eine Garbage Collection durchgeführt wird, werden auch die zugehörigen Uhren getrennt und die Garbage Collection erfolgt.When an object is garbage collected, its clocks are also disconnected and garbage collected.
Weitere Informationen zu Clock-Objekten finden Sie unter Übersicht über das Animations-und Zeit Steuerungssystem.For more information about clock objects, see Animation and Timing System Overview.
Gilt für:
BeginStoryboard(Storyboard, HandoffBehavior, Boolean)
Startet die Sequenz von Aktionen, die im bereitgestellten Storyboard enthalten ist, im angegebenen Zustand für das Steuerelement der Animation nach deren Start.Begins the sequence of actions that are contained in the provided storyboard, with specified state for control of the animation after it is started.
public:
void BeginStoryboard(System::Windows::Media::Animation::Storyboard ^ storyboard, System::Windows::Media::Animation::HandoffBehavior handoffBehavior, bool isControllable);
public void BeginStoryboard (System.Windows.Media.Animation.Storyboard storyboard, System.Windows.Media.Animation.HandoffBehavior handoffBehavior, bool isControllable);
member this.BeginStoryboard : System.Windows.Media.Animation.Storyboard * System.Windows.Media.Animation.HandoffBehavior * bool -> unit
Public Sub BeginStoryboard (storyboard As Storyboard, handoffBehavior As HandoffBehavior, isControllable As Boolean)
Parameter
- storyboard
- Storyboard
Das zu startende Storyboard.The storyboard to begin.
- handoffBehavior
- HandoffBehavior
Ein Wert der Enumeration zum Beschreiben der auszuführenden Aktion, wenn eine im Storyboard beschriebene Eigenschaft bereits animiert ist.A value of the enumeration that describes behavior to use if a property described in the storyboard is already animated.
- isControllable
- Boolean
Bestimmt, ob die Animation steuerbar ist (angehalten werden kann), nachdem sie gestartet wurde.Declares whether the animation is controllable (can be paused) after it is started.
Hinweise
Bei den Signaturen, die den-Parameter, den-Parameter oder den-Parameter nicht verwenden, isControllable
false
werden die der Animation zugeordneten Zeitachsen Uhren entfernt, sobald der "Fill"-Zeitraum erreicht ist.For the signatures that do not use the isControllable
, parameter, or when that parameter is specified false
, the timeline clocks associated with the animation are removed as soon as it reaches the "Fill" period. Daher kann die Animation nicht neu gestartet werden, nachdem Sie einmal ausgeführt wurde.Therefore the animation cannot be restarted after being run once. Beachten Sie, dass das Steuern einer Animation auch erfordert, dass das Storyboard als eine Instanz im Code benannt oder zugänglich ist.Note that controlling an animation also requires that the storyboard be named or accessible as an instance in code.
Verwenden von Compose HandoffBehaviorUsing the Compose HandoffBehavior
Wenn Sie Storyboard , AnimationTimeline oder AnimationClock auf eine Eigenschaft mithilfe von anwenden Compose HandoffBehavior , Clock verbrauchen alle Objekte, die dieser Eigenschaft zuvor zugeordnet sind, weiterhin Systemressourcen. das Zeit Steuerungssystem entfernt diese Uhren nicht automatisch.When you apply a Storyboard, AnimationTimeline, or AnimationClock to a property by using the Compose HandoffBehavior, any Clock objects previously associated with that property continue to consume system resources; the timing system does not remove these clocks automatically.
Um Leistungsprobleme zu vermeiden, wenn Sie eine große Anzahl von Uhren mithilfe von anwenden Compose , sollten Sie das Verfassen von Uhren aus der animierten Eigenschaft entfernen, nachdem Sie fertiggestellt wurden.To avoid performance issues when you apply a large number of clocks by using Compose, you should remove composing clocks from the animated property after they complete. Es gibt mehrere Möglichkeiten, eine Uhr zu entfernen:There are several ways to remove a clock:
Um alle Uhren aus einer Eigenschaft zu entfernen, verwenden Sie die- ApplyAnimationClock(DependencyProperty, AnimationClock) BeginAnimation(DependencyProperty, AnimationTimeline) Methode oder die-Methode des animierten Objekts.To remove all clocks from a property, use the ApplyAnimationClock(DependencyProperty, AnimationClock) or BeginAnimation(DependencyProperty, AnimationTimeline) method of the animated object. Geben Sie die zu animierende Eigenschaft als ersten Parameter und
null
als Sekunde an.Specify the property being animated as the first parameter, andnull
as the second. Dadurch werden alle Animations Uhren aus der-Eigenschaft entfernt.This removes all animation clocks from the property.Um einen bestimmten AnimationClock aus einer Liste von Uhren zu entfernen, verwenden Controller Sie die-Eigenschaft des, AnimationClock um eine abzurufen ClockController , und rufen Sie dann die- Remove Methode von auf ClockController .To remove a specific AnimationClock from a list of clocks, use the Controller property of the AnimationClock to retrieve a ClockController, then call the Remove method of the ClockController. Dies erfolgt in der Regel im Completed Ereignishandler für eine Uhr.This is typically done in the Completed event handler for a clock. Beachten Sie, dass nur Stamm Uhren von einem gesteuert werden können ClockController ; die- Controller Eigenschaft einer untergeordneten Uhr gibt zurück
null
.Note that only root clocks can be controlled by a ClockController; the Controller property of a child clock returnsnull
. Beachten Sie auch, dass das- Completed Ereignis nicht ausgelöst wird, wenn die effektive Dauer der Uhr ewig ist.Note also that the Completed event is not raised if the effective duration of the clock is forever. In diesem Fall muss der Benutzer bestimmen, wann aufgerufen werden soll Remove .In that case, the user must determine when to call Remove.
Dies betrifft hauptsächlich Animationen für Objekte, die eine lange Lebensdauer haben.This is primarily an issue for animations on objects that have a long lifetime. Wenn für ein Objekt eine Garbage Collection durchgeführt wird, werden auch die zugehörigen Uhren getrennt und die Garbage Collection erfolgt.When an object is garbage collected, its clocks are also disconnected and garbage collected.
Weitere Informationen zu Clock-Objekten finden Sie unter Übersicht über das Animations-und Zeit Steuerungssystem.For more information about clock objects, see Animation and Timing System Overview.