Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

RoutedEventArgs Class

Contains state information and event data associated with a routed event.

System.Object
  System.EventArgs
    System.Windows.RoutedEventArgs
      More...

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

public class RoutedEventArgs : EventArgs

The RoutedEventArgs type exposes the following members.

  NameDescription
Public methodSupported by Silverlight for Windows PhoneRoutedEventArgsInitializes a new instance of the RoutedEventArgs class.
Top

  NameDescription
Public propertySupported by Silverlight for Windows PhoneOriginalSourceGets a reference to the object that raised the event.
Top

  NameDescription
Public methodSupported by Silverlight for Windows PhoneEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodSupported by Silverlight for Windows PhoneFinalizeAllows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodSupported by Silverlight for Windows PhoneMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneToStringReturns a string that represents the current object. (Inherited from Object.)
Top

This class is responsible for packaging the event data for a routed event, providing extra event state information, and is used by the event system for invoking the handler associated with the routed event.

The most relevant information carried in the event data is the OriginalSource, which reports the object that first raised the event. In the case of a bubbling routed event, this could be a different object in the element tree than the object where the handler being invoked is attached.

In WPF, there is a concept of a Source property that is separate from OriginalSource. This distinction is not present in Silverlight, because classes cannot adjust the reported source of a routed event in the Silverlight event system. (In WPF, control classes sometimes adjust the event source as part of their compositing logic.)

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

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

System.Object
  System.EventArgs
    System.Windows.RoutedEventArgs
      System.Windows.Controls.CalendarDateChangedEventArgs
      System.Windows.Controls.CalendarModeChangedEventArgs
      System.Windows.Controls.CleanUpVirtualizedItemEventArgs
      System.Windows.Controls.ContentChangedEventArgs
      System.Windows.Controls.PopulatedEventArgs
      System.Windows.Controls.PopulatingEventArgs
      System.Windows.Controls.Primitives.DragCompletedEventArgs
      System.Windows.Controls.Primitives.DragDeltaEventArgs
      System.Windows.Controls.Primitives.DragStartedEventArgs
      System.Windows.Controls.Primitives.ScrollEventArgs
      System.Windows.Controls.RoutedPropertyChangingEventArgs<T>
      System.Windows.Controls.SelectionChangedEventArgs
      System.Windows.Controls.SubImageRoutedEventArgs
      System.Windows.Controls.TextChangedEventArgs
      System.Windows.Controls.ValidationErrorEventArgs
      System.Windows.DragEventArgs
      System.Windows.ExceptionRoutedEventArgs
      System.Windows.Input.KeyEventArgs
      System.Windows.Input.MouseEventArgs
      System.Windows.Input.TextCompositionEventArgs
      System.Windows.Media.LogReadyRoutedEventArgs
      System.Windows.Media.MediaCommandEventArgs
      System.Windows.Media.RateChangedRoutedEventArgs
      System.Windows.Media.TimelineMarkerRoutedEventArgs
      System.Windows.RoutedPropertyChangedEventArgs<T>
      System.Windows.SizeChangedEventArgs
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft