RoutedEventArgs Class
Namespace: Stride.UI.EventsAssembly: Stride.UI.dll
Contains state information and event data associated with a routed event.
public class RoutedEventArgs : EventArgs
Name | Description | |
---|---|---|
Constructors | ||
RoutedEventArgs() | Initializes a new instance of the RoutedEventArgs class. |
|
RoutedEventArgs(RoutedEvent) | Initializes a new instance of the RoutedEventArgs class, using the supplied routed event identifier. |
|
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. |
|
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. |
|
IsBeingRouted | ||
RoutedEvent | Gets or sets the RoutedEvent associated with this RoutedEventArgs instance. |
|
Source | Gets or sets a reference to the object that raised the event. |
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
Type | Name | Description |
---|---|---|
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
Type | Name | Description |
---|---|---|
RoutedEvent | routedEvent | The routed event identifier for this instance of the RoutedEventArgs class. |
UIElement | source | 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
Type | Description |
---|---|
System.Boolean |
IsBeingRouted
protected bool IsBeingRouted { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
RoutedEvent
Gets or sets the RoutedEvent associated with this RoutedEventArgs instance.
public RoutedEvent RoutedEvent { get; set; }
Property Value
Type | Description |
---|---|
RoutedEvent |
Exceptions
Type | Condition |
---|---|
System.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
Type | Description |
---|---|
UIElement |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Attempted to change the source value while the event is being routed. |