我如何将UWP动词(Windows右键单击操作)与文件夹相关联,而不仅仅是文件扩展名
我有一个UWP应用程序,旨在采用0或更多参数,该参数要么是通往文件夹的路径,要么是压缩存档的路径。我希望通过在Windows Explorer中添加右键单击菜单来传递这些参数。使用ZIP或RAR文件,似乎很容易:
<uap:SupportedFileTypes>
<uap:FileType>.zip</uap:FileType>
<uap:FileType>.rar</uap:FileType>
</uap:SupportedFileTypes>
<uap2:SupportedVerbs>
<uap3:Verb Id="listfilesummary" Parameters=""%1"" MultiSelectModel="Player">File Summary</uap3:Verb>
</uap2:SupportedVerbs>
但是,虽然我知道如何添加传统的Win32应用程序的注册表条目以对文件夹进行右键单击操作,但我找不到有关如何在UWP清单的情况下找到有关如何执行此操作的信息应用程序。
I have a UWP app meant to take 0 or more arguments which are either the path to a folder or the path to a compressed archive. I want these arguments to be passed by adding a right click menu in Windows explorer. With zip or rar files it seems pretty easy:
<uap:SupportedFileTypes>
<uap:FileType>.zip</uap:FileType>
<uap:FileType>.rar</uap:FileType>
</uap:SupportedFileTypes>
<uap2:SupportedVerbs>
<uap3:Verb Id="listfilesummary" Parameters=""%1"" MultiSelectModel="Player">File Summary</uap3:Verb>
</uap2:SupportedVerbs>
However while I know how to add the registry entries for a traditional Win32 app to have a right click action for a folder I cannot find any information on how to do this in the manifest of a UWP app.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不得不说这是UWP中不可能的。您无法将文件夹作为UWP应用程序的关联类型。 But you could get the neighboring files of the file for which the app was activated via the
I have to say that this is not possible in UWP. You can't make a folder as the associate type of your UWP app. But you could get the neighboring files of the file for which the app was activated via the FileActivatedEventArgs.NeighboringFilesQuery Property