The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

FrameworkElement.Triggers Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets the collection of triggers for animations that are defined for a FrameworkElement.

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.

public TriggerCollection Triggers { get; }

XAML Values


One or more object elements of type EventTrigger.

Property Value

Type: System.Windows.TriggerCollection
The collection of triggers for animations that are defined for this object.

EventTrigger and the object.Triggers property element usage on elements are supported by Windows Phone, but using this technique is discouraged for current applications. EventTrigger can only support a triggering action for the Loaded event (you name the triggering event in the EventTrigger.RoutedEvent property.) This makes the EventTrigger technique unsuitable for most run-time interactions. Instead of using EventTrigger and the Triggers property, consider one of the following two alternatives:

  • For animating properties on objects that are not controls, place the storyboard in the general Resources for a page or application. Then assign an event handler on the element where you would have placed "Triggers". The event handler, when responding to the relevant event, should retrieve the storyboard from the resource dictionary. You then call Begin on the retrieved Storyboard. An additional benefit of this technique is that the same storyboard can be applied to multiple user interactions.

  • For animating properties on objects that are controls (derive from Control), use the VisualStateManager technique, and run the appropriate animations based on state of or inputs to the control by calling GoToState.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone