EventTrigger.RoutedEvent property

Applies to Windows and Windows Phone

Gets or sets the name of the event that initiates the trigger. Not commonly set, see Remarks.

Syntax


Public Property RoutedEvent As RoutedEvent

Property value

Type: RoutedEvent

The name or identifier of the event.

Remarks

EventTrigger along with BeginStoryboard and the Triggers property is part of a legacy syntax for starting storyboarded animations automatically without requiring code that calls Begin. In Windows Runtime XAML, the default behavior for event triggers and the only event that can be used to invoke an EventTrigger is FrameworkElement.Loaded. Because that's both the default and the only enabled behavior, you don't usually set RoutedEvent, and just use the XAML <EventTrigger>.

If you did set RoutedEvent explicitly (not recommended), the only XAML that works is <EventTrigger RoutedEvent="FrameworkElement.Loaded">. Unqualified "Loaded", or any other value, throws a parse exception.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml
Windows::UI::Xaml [C++]

Metadata

Windows.winmd

See also

EventTrigger

 

 

Show:
© 2014 Microsoft