Table of Contents

Class RoutedEventArgs

Namespace
Stride.UI.Events
Assembly
Stride.UI.dll

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

public class RoutedEventArgs : EventArgs
Inheritance
RoutedEventArgs
Derived
Inherited Members

Constructors

RoutedEventArgs()

Initializes a new instance of the RoutedEventArgs class.

public RoutedEventArgs()

Remarks

When using this parameterless constructor, all public properties of the new RoutedEventArgs instance assume the following default values: RoutedEvent = null, Handled = false, Source = null. Null values for Source only mean that the RoutedEventArgs data makes no attempt to specify the source. When this instance is used in a call to RaiseEvent(RoutedEventArgs), the Source value is populated based on the element that raised the event and are passed on to listeners through the routing.

RoutedEventArgs(RoutedEvent)

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

public RoutedEventArgs(RoutedEvent routedEvent)

Parameters

routedEvent RoutedEvent

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

Remarks

When using this constructor, unspecified public properties of the new RoutedEventArgs instance assume the following default values: Handled = false, Source = null. Null values for Source only mean that the RoutedEventArgs data makes no attempt to specify the source. When this instance is used in a call to RaiseEvent(RoutedEventArgs), the Source value is populated based on the element that raised the event and are passed on to listeners through the routing.

RoutedEventArgs(RoutedEvent, UIElement)

Initializes a new instance of the RoutedEventArgs class, using the supplied routed event identifier, and providing the opportunity to declare a different source for the event.

public RoutedEventArgs(RoutedEvent routedEvent, UIElement source)

Parameters

routedEvent RoutedEvent

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

source UIElement

An alternate source that will be reported when the event is handled. This pre-populates the Source property.

Remarks

When using this constructor, unspecified public properties of the new RoutedEventArgs instance assume the following default values: Handled = false.

Properties

Handled

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

public bool Handled { get; set; }

Property Value

bool

IsBeingRouted

protected bool IsBeingRouted { get; }

Property Value

bool

RoutedEvent

Gets or sets the RoutedEvent associated with this RoutedEventArgs instance.

public RoutedEvent RoutedEvent { get; set; }

Property Value

RoutedEvent

Exceptions

InvalidOperationException

Attempted to change the RoutedEvent value while the event is being routed.

Source

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

public UIElement Source { get; set; }

Property Value

UIElement

Exceptions

InvalidOperationException

Attempted to change the source value while the event is being routed.