RoutedEvent Class

July 28, 2014

Represents a routed event to the Windows Phone event system.

System.Object
  System.Windows.RoutedEvent

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

public sealed class RoutedEvent

The RoutedEvent type exposes the following members.

  NameDescription
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns the string representation of the routed event. (Overrides Object.ToString().)
Top

In WPF, the RoutedEvent class holds additional information, such as the routing strategy. In Windows Phone, a routed event does not require this information. Only the bubbling route event routing technique is supported in Windows Phone, and the event identifiers are not required for trigger usages because trigger usages are limited to the Loaded case. Therefore, in Windows Phone 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 Windows Phone 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 for Windows Phone 8.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Show:
© 2014 Microsoft