Represents a trigger that applies a set of actions (animation storyboards) in response to an event.
<ContentPropertyAttribute("Actions", True)> _ Public NotInheritable Class EventTrigger _ Inherits TriggerBase
[ContentPropertyAttribute("Actions", true)] public sealed class EventTrigger : TriggerBase
<EventTrigger> oneOrMoreBeginStoryboards </EventTrigger>
One or more BeginStoryboard object elements. Object elements defined here become members of the TriggerActionCollection that is the value of the Actions property, if you use code to examine that collection at run time.
The EventTrigger type exposes the following members.
EventTrigger and the object.Triggers property element usage on elements are supported by Silverlight, but using this technique is discouraged for current applications. EventTrigger can only support a triggering action for the Loaded event (you name the event in the EventTrigger..::.RoutedEvent property.) This makes an EventTrigger 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.
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.
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.