我添加了以下行:
FullTrustProcessLauncher.LaunchFullTrustProcessForCurrentAppAsync();
但我希望能够检查这是否可行(最好没有 try-catch block )。有什么方法可以测试桌面扩展是否存在?
最佳答案
推荐的方法是:
if (ApiInformation.IsApiContractPresent("Windows.ApplicationModel.FullTrustAppContract", 1, 0))
{
await FullTrustProcessLauncher.LaunchFullTrustProcessForCurrentAppAsync();
}
关于c# - 检查 UWP 桌面扩展是否存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49348289/