在" Project Centennial"中获取协议激活参数。应用

时间:2016-09-11 13:28:31

标签: uwp windows-store-apps win-universal-app project-centennial desktop-bridge

如何在Winforms应用中访问已转换为UWP应用的协议激活参数?

问题在于OnActivated方法不存在,因此我无法获得IActivatedEventArgs

2 个答案:

答案 0 :(得分:1)

我假设您要处理文件类型,在这种情况下,您可以检查Environment.GetCommandLineArgs()正常参数。第二个参数将是激活的文件或协议。

答案 1 :(得分:0)

  

如何在Winforms应用中访问已转换为UWP应用的协议激活参数?

生命周期无法集成到Converted UWP应用中。基本上常见的场景是启用Toast通知,动态磁贴,App服务和后台任务。

请检查Supported UWP APIs for converted desktop apps

一些官方样本:DesktopBridgeToUWP-Samples

相关问题