Table of Contents

Class RoutedEventArgs

Namespace
nanoFramework.UI
Assembly
nanoFramework.Graphics.dll

The container for all state associated with a RoutedEvent

public class RoutedEventArgs : EventArgs
Inheritance
RoutedEventArgs
Derived
Inherited Members
Extension Methods

Remarks

RoutedEventArgs constitutes the

RoutedEvent,

Handled,

Source and

OriginalSource

         Different <xref href="nanoFramework.UI.RoutedEventArgs" data-throw-if-not-resolved="false"></xref>
         can be used with a single <xref href="nanoFramework.UI.RoutedEventArgs.RoutedEvent" data-throw-if-not-resolved="false"></xref><p></p><p></p>

         The <xref href="nanoFramework.UI.RoutedEventArgs" data-throw-if-not-resolved="false"></xref> is responsible
         for packaging the <xref href="nanoFramework.UI.RoutedEventArgs.RoutedEvent" data-throw-if-not-resolved="false"></xref>,
         providing extra event state info, and invoking the
         handler associated with the RoutedEvent

Constructors

RoutedEventArgs()

Constructor for RoutedEventArgs

public RoutedEventArgs()

Remarks

All members take default values

RoutedEvent defaults to null

Handled defaults to false

Source defaults to null

OriginalSource also defaults to null

RoutedEventArgs(RoutedEvent)

Constructor for RoutedEventArgs

public RoutedEventArgs(RoutedEvent routedEvent)

Parameters

routedEvent RoutedEvent

The new value that the RoutedEvent Property is being set to

RoutedEventArgs(RoutedEvent, object)

Constructor for RoutedEventArgs

public RoutedEventArgs(RoutedEvent routedEvent, object source)

Parameters

routedEvent RoutedEvent

The new value that the RoutedEvent Property is being set to

source object

The new value that the SourceProperty is being set to

Properties

Handled

Returns a boolean flag indicating if or not this RoutedEvent has been handled this far in the route

public bool Handled { get; set; }

Property Value

bool

Remarks

Initially starts with a false value before routing has begun

OriginalSource

Returns OriginalSource object that raised the RoutedEvent

public object OriginalSource { get; }

Property Value

object

Remarks

Always returns the OriginalSource object that raised the RoutedEvent unlike Source that may vary under specific scenarios

This property acquires its value once before the event handlers are invoked and never changes then on

RoutedEvent

Returns the RoutedEvent associated with this RoutedEventArgs

public RoutedEvent RoutedEvent { get; set; }

Property Value

RoutedEvent

Remarks

The RoutedEvent cannot be null at any time

Source

Returns Source object that raised the RoutedEvent

public object Source { get; set; }

Property Value

object

Methods

OnSetSource(object)

Invoked when the source of the event is set

protected virtual void OnSetSource(object source)

Parameters

source object

The new value that the SourceProperty is being set to

Remarks

Changing the source of an event can often require updating the data within the event. For this reason, the OnSource= method is protected virtual and is meant to be overridden by sub-classes of RoutedEventArgs

Also see Source