Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    RoutedEventArgs Class

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

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

    System.Object → System.EventArgs → RoutedEventArgs
    Derived from RoutedEventArgs: TouchEventArgs

    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.

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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.


    Inherited Members

    System.EventArgs.Empty

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation