遵循示例here.
此代码引发错误:
protected override void OnFileActivated(FileActivatedEventArgs args)
{
// TODO: Handle file activation
// The number of files received is args.Files.Size
// The name of the first file is args.Files[0].Name
}
错误是:
'MainPage.OnFileActivated(FileActivatedEventArgs)': no suitable method found to override
为什么找不到此替代方法?我正在使用UWP。
答案 0 :(得分:2)
如果您查看文档
您将看到重写应该在应用程序类上,您没有提供代码,但看起来您试图在页面上重载它。