Application.OnLaunched 位于哪个命名空间?

In which namespace Application.OnLaunched is located?

我正在尝试将 HockeyApp 添加到我的 WPF 应用程序,但找不到 Application.OnLaunched? 任何想法表示感谢!

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)

它位于 system.windows.application

看来,KB 页面不正确。 WPF Application class 中没有 OnLaunched 方法。最接近的等价物是 OnStartup.

请注意,Silverlight Application 与 WPF 不同 - 您需要处理 Startup 事件,因为那里没有虚拟 OnStartup 方法。