RoutedEventArgs Constructor (RoutedEvent)


Initializes a new instance of the RoutedEventArgs class, using the supplied routed event identifier.

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

new : 
        routedEvent:RoutedEvent -> RoutedEventArgs


Type: System.Windows.RoutedEvent

The routed event identifier for this instance of the RoutedEventArgs class.

When using this overloaded constructor, unspecified properties of the new RoutedEventArgs instance assume the following default values:

Null values for Source and OriginalSource only mean that this RoutedEventArgs makes no attempt to specify the source. When this instance is used in a call to RaiseEvent, the Source and OriginalSource values are populated based on the element that raised the event and are passed on to listeners through the routing.

The following example constructs a new RoutedEventArgs for use in a call to RaiseEvent.

Private Sub RaiseTapEvent()
    Dim newEventArgs As New RoutedEventArgs(MyButtonSimple.TapEvent)
End Sub

.NET Framework
Available since 3.0
Return to top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft