Get protocol activation args in “Project Centennia

2019-06-14 13:45发布

How can I access the protocol activation arguments in a Winforms app that's converted into a UWP app?

The problem is that the OnActivated method is absent so I can't get the IActivatedEventArgs.

2条回答
神经病院院长
2楼-- · 2019-06-14 14:09

How can I access the protocol activation arguments in a Winforms app that's converted into a UWP app?

The lifecycle can't be integrated in Converted UWP app. Basically the common scenarios are enabling Toast notification, Live tile, App service and Background task.

Please check Supported UWP APIs for converted desktop apps

Some official samples: DesktopBridgeToUWP-Samples

查看更多
ら.Afraid
3楼-- · 2019-06-14 14:20

I'm assuming you want to handle file types in which case you can check Environment.GetCommandLineArgs() as normal for arguments. The second argument will be the file or protocol activated.

查看更多
登录 后发表回答