RoutedEvent Class
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Represents a routed event to the Silverlight event system.
Inheritance Hierarchy
System.Object
System.Windows.RoutedEvent
Namespace: System.Windows
Assembly: System.Windows (in System.Windows.dll)
Syntax
'Declaration
Public NotInheritable Class RoutedEvent
public sealed class RoutedEvent
The RoutedEvent type exposes the following members.
Methods
Name | Description | |
---|---|---|
Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns the string representation of the routed event. (Overrides Object.ToString().) |
Top
Remarks
In WPF, the RoutedEvent class holds additional information, such as the routing strategy. In Silverlight 5, a routed event does not require this information. Only the bubbling route event routing technique is supported in Silverlight 5, and the event identifiers are not required for trigger usages because trigger usages are limited to the Loaded case. Therefore, in Silverlight 5 a routed event is generally identified by name in XAML usages, which does not require the identifier field.
The primary usage of the RoutedEvent class in Silverlight 5 is to support an event handling technique whereby you can invoke handlers on routed events even if the Handled property of event data is true. This situation exists because control class implementations might handle input events as part of their logic. Specific instances of controls might still want to handle such events in uncommon scenarios. To use this technique, you call the UIElement.AddHandler method on the control instance, declaring handledEventsToo as true, and providing the static RoutedEvent identifier of the relevant event as the routedEvent parameter. This entails that only events where a RoutedEvent identifier exists in the class definition can be used in this way. For more information, see UIElement.AddHandler or Events Overview for Silverlight.
Version Information
Silverlight
Supported in: 5, 4, 3
Silverlight for Windows Phone
Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0
Platforms
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also