Files
docs-desktop/dotnet-desktop-guide/framework/wpf/graphics-multimedia/how-to-use-event-triggers-to-control-a-storyboard-after-it-starts.md
Andy (Steve) De George be103da07e Replace various WPF include files with content (#1335)
* net-current-v30plus-md.md

* net-current-v40plus-md.md

* tla2sharptla-ui-md.md

* tla2sharptla-uiautomation-md.md

* tla2sharptla-winclient-md.md

* tla2sharptla-xaml-md.md

* tlasharptla-ui-md.md

* tlasharptla-uiautomation-md.md

* tlasharptla-winclient-md.md

* tlasharptla-xaml-md.md

* fix warnings
2022-03-16 12:14:11 -04:00

2.9 KiB

title, ms.date, helpviewer_keywords, ms.assetid
title ms.date helpviewer_keywords ms.assetid
How to: Use Event Triggers to Control a Storyboard After It Starts 03/30/2017
triggers [WPF], controlling Storyboards
event triggers [WPF], controlling Storyboards
Storyboards [WPF], controlling after start
3b115594-6a93-4972-b24d-61aa16f1c15f

How to: Use Event Triggers to Control a Storyboard After It Starts

This example shows how to control a xref:System.Windows.Media.Animation.Storyboard after it starts. To start a xref:System.Windows.Media.Animation.Storyboard by using XAML, use xref:System.Windows.Media.Animation.BeginStoryboard, which distributes the animations to the objects and properties they animate and then starts the storyboard. If you give xref:System.Windows.Media.Animation.BeginStoryboard a name by specifying its xref:System.Windows.Media.Animation.BeginStoryboard.Name%2A property, you make it a controllable storyboard. You can then interactively control the storyboard after it starts.

Use the following storyboard actions together with xref:System.Windows.EventTrigger objects to control a storyboard.

Example

The following example uses controllable storyboard actions to interactively control a storyboard.

Note

To see an example of controlling a storyboard by using code, see Control a Storyboard After It Starts Using Its Interactive Methods.

[!code-xamltimingbehaviors_snip#ControlStoryboardExampleUsingWholePage]

For additional examples, see the Animation Example Gallery.

See also