Gets the collection of triggers for animations that are defined for a FrameworkElement.
Assembly: System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.
<frameworkElement> <frameworkElement.Triggers> oneorMoreTriggers </frameworkElement.Triggers> </frameworkElement>
Property ValueType: 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 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.