Skip to end of metadata
Go to start of metadata

Remarks

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

Example

Routed event introduces bubbling and tunneling routing strategy.

In bubbling routing strategy, the event handlers on the event source are invoked. The routed event then routes to successive parent elements until reaching the element tree root. Most routed events use the bubbling routing strategy.

The following example shows how to handle the KeyDown routed event, which is a bubbling event.

XAML
C#

Definition

public class ISRoutedEventArgs : RoutedEventArgs

Summary

The following table summarizes the members exposed in this class.

Public Constructors

Public Properties

HandledGets or sets a value that indicates the present state of the event handling for a routed event as it travels the route.
HandledByGets or sets the source object that handles this event.
IsHandledByPrimitiveDetermines whether this event is handled internally by control infrastructure.
OriginalSourceGets the original reporting source as determined by pure hit testing, before any possible Source adjustment by a parent class.
RoutedEventGets or sets the RoutedEvent associated with this RoutedEventArgs instance.
SourceGets or sets a reference to the object that raised the event.

Protected Properties

OriginalSourceGets the original reporting source as determined by pure hit testing, before any possible Source adjustment by a parent class.

Protected Methods


Public Constructors

public ISRoutedEventArgs()

 

public ISRoutedEventArgs(RoutedEvent routedEvent)

 

Parameters

routedEvent 

 

public ISRoutedEventArgs(RoutedEvent routedEvent, object source)

 

Parameters

routedEvent 
source 

 

Public Properties

public bool Handled { get; set; }

Gets or sets a value that indicates the present state of the event handling for a routed event as it travels the route.

public DependencyObject HandledBy { get; set; }

Gets or sets the source object that handles this event.

public bool IsHandledByPrimitive { get; }

Determines whether this event is handled internally by control infrastructure.

public object OriginalSource { get; }

Gets the original reporting source as determined by pure hit testing, before any possible Source adjustment by a parent class.

public RoutedEvent RoutedEvent { get; set; }

Gets or sets the RoutedEvent associated with this RoutedEventArgs instance.

public object Source { get; set; }

Gets or sets a reference to the object that raised the event.

Protected Properties

protected object OriginalSource { set; }

Gets the original reporting source as determined by pure hit testing, before any possible Source adjustment by a parent class.

Protected Methods

protected void InvokeEventHandler(Delegate genericHandler, object genericTarget)

 

Parameters

genericHandler 
genericTarget 

 

protected void OnSetSource(object source)

 

Parameters

source 
  • No labels