Search code examples
c#wpfhockeyapp

In which namespace Application.OnLaunched is located?


I am trying to add HockeyApp to my WPF app, but cannot find Application.OnLaunched ? Any thought appreciated thanks!

https://support.hockeyapp.net/kb/client-integration-windows-and-windows-phone/hockeyapp-for-applications-on-windows#crash-reporting

For platforms other than UWP, you need to add the following line of code at the end of the OnLaunched(LaunchActivatedEventArgs e) Method (in App.xaml.cs)


Solution

  • It seems, that KB page is incorrect. There's no OnLaunched method in WPF Application class. The nearest equivalent will be OnStartup.

    Note, that Silverlight Application differs from WPF one - you need to handle Startup event, because there's no virtual OnStartup method there.