.NET Framework Class Library for Silverlight
RoutedEventArgs..::.Source Property
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

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

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)

Syntax

Visual Basic (Declaration)
Public Property Source As Object
Visual Basic (Usage)
Dim instance As RoutedEventArgs
Dim value As Object

value = instance.Source

instance.Source = value
C#
public Object Source { get; set; }
Visual C++
public:
property Object^ Source {
    Object^ get ();
    void set (Object^ value);
}
JScript
public function get Source () : Object
public function set Source (value : Object)

Property Value

Type: System..::.Object

The object that raised the event.

Remarks

For any bubbling routed event that has actually traveled the route beyond the element that raised it, and for any tunneling routed event that has not yet tunneled down to the element that raised it, the value of Source will be different than the value of the sender parameter of the event handler signature. Which of the two elements involved in the event is of the most importance in any given handler (Source, the element that raised it, or sender, the element that is currently handling it) is dependent on the application logic that your handler is addressing.

See Also

Reference

Page view tracker