【发布时间】:2016-03-10 18:31:36
【问题描述】:
我正在用 C# 为 UWP 编写一个播放器。
我在启动文件时遇到问题。
当应用程序打开时,启动文件效果很好,但是当我关闭应用程序并启动文件时,它给了我错误: '远程过程调用失败'
我设置了 fileTypeAssociation,这里是我在 App.xaml.cs 中启动的一些代码:
protected override void OnFileActivated(FileActivatedEventArgs e)
{
Frame rootFrame = CreateRootFrame();
if (rootFrame.Content == null)
{
if (!rootFrame.Navigate(typeof(MainPage), e))
throw new Exception("Failed to create initial page");
}
else
rootFrame.Navigate(typeof(PlayerPage), e);
Window.Current.Activate();
}
我该如何解决?
【问题讨论】:
标签: c# windows-10 win-universal-app