Skip to main content

Microsoft Silverlight

Unanswered Question Silverlight 2 : RoutedEventArgs.EmptyRSS Feed

(0)

Jason K
Jason K

Member

Member

2 points

2 Posts

Silverlight 2 : RoutedEventArgs.Empty

RoutedEventArgs.Empty is returning type EventArgs instead of type RoutedEventArgs.

private void UserControl_Loaded(object sender, RoutedEventArgs e)
{
SearchBtn_Click((object)SearchBtn, RoutedEventArgs.Empty);
}

private void SearchBtn_Click(object sender, RoutedEventArgs e)
{
}

Throws exception: 'Argument '2': cannot convert from 'System.EventArgs' to 'System.Windows.RoutedEventArgs'

Cass
Cass

Contributor

Contributor

3157 points

654 Posts

Re: Silverlight 2 : RoutedEventArgs.Empty

Try

SearchBtn_Click((object)SearchBtn,  New RoutedEventArgs);
private void SearchBtn_Click(object sender, RoutedEventArgs e)
{
}

or

SearchBtn_Click((object)SearchBtn,  New EventArgs);
private void SearchBtn_Click(object sender, EventArgs e)
{
}

Jason K
Jason K

Member

Member

2 points

2 Posts

Re: Silverlight 2 : RoutedEventArgs.Empty

 I understand that the soultion to the problem is:

SearchBtn_Click((object)SearchBtn,  new RoutedEventArgs());
private void SearchBtn_Click(object sender, RoutedEventArgs e)
{
}
I just wanted to let the Dev's know that it was returning the wrong type and found this to be the only place to report bugs for the new Silverlight 2 Beta

Allen Chen – MSFT
Allen Ch...

Star

Star

13862 points

1,803 Posts

Re: Silverlight 2 : RoutedEventArgs.Empty

Hi:

  Thanks for highlighting this issue. It's a known issue that has been submitted here:

http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=292848

  It had been sent to the appropriate group.

Thanks again.

Sincerely,
Allen Chen
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities