Search code examples
c#.netsilverlightroutedeventargs

Where has RoutedEventArgs.Source gone?


I've just downloaded source code of a Silverlight app and figured out happily that there seems to be only one error keeping me from compiling it:


private void UserControl_LostFocus(object sender, RoutedEventArgs e)
{
  object o = e.Source;
}

there seems to be no Source in RoutedEventArgs despite the fact the documentation says it's there.

Any idea where has RoutedEventArgs.Source gone?


Solution

  • It doesn't exist in Silverlight - only in the desktop framework.

    If you look at the Silverlight RoutedEventArgs documentation you'll see there are fewer members than for the desktop .NET 4 version.