我如何将UWP动词(Windows右键单击操作)与文件夹相关联,而不仅仅是文件扩展名

发布于 2025-02-08 21:07:39 字数 583 浏览 1 评论 0原文

我有一个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="&quot;%1&quot;" 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

娇女薄笑 2025-02-15 21:07:39

我如何将UWP动词(Windows右键单击操作)与文件夹相关联

我不得不说这是UWP中不可能的。您无法将文件夹作为UWP应用程序的关联类型。 But you could get the neighboring files of the file for which the app was activated via the

How can I associate a UWP verb (Windows right click action) with a folder

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文