Export (0) Print
Expand All

RoutedEventArgs::RoutedEvent Property

Gets or sets the RoutedEvent associated with this RoutedEventArgs instance.

Namespace:  System.Windows
Assembly:  PresentationCore (in PresentationCore.dll)

public:
property RoutedEvent^ RoutedEvent {
	RoutedEvent^ get ();
	void set (RoutedEvent^ value);
}

Property Value

Type: System.Windows::RoutedEvent
The identifier for the event that has been invoked.

ExceptionCondition
InvalidOperationException

Attempted to change the RoutedEvent value while the event is being routed.

You cannot set this value on a RoutedEventArgs that has already been routed (for instance, if you obtained the arguments through a handler). Attempting to do so will generate an exception. You can only set it on an instance that has not yet been used to generate an invocation of the event.

The value of RoutedEvent cannot be nullptr at any time.

The following example creates new routed event data with an initial constructor and then sets the RoutedEvent property as a subsequent operation. You must have RoutedEvent set prior to raising the routed event.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft