简体   繁体   English

如何使wpf文件激活?

[英]How to make wpf file activation?

So for the previous hours i've been looking on how to do and all i've found is UWP solutions that doesn't work with the tutorials i've found.所以在之前的几个小时里,我一直在研究如何做,我发现的所有 UWP 解决方案都不适用于我找到的教程。

I am making an application that read a specific format (Some Json and other put together).我正在制作一个读取特定格式的应用程序(一些 Json 和其他放在一起)。 Those file are readable by my app, no problems.我的应用程序可以读取这些文件,没问题。

To push forward the application i'd like to make that the files to be opened by my app with a single double-click like Acrobat open the .pdf.为了推进应用程序,我想让我的应用程序通过像 Acrobat 这样的双击打开 .pdf 文件来打开文件。

For now I have no code because no idea on where the work has to be done.现在我没有代码,因为不知道必须在哪里完成工作。 If you have a solution or part of a solution post it and i'll update the post if needed.如果您有解决方案或解决方案的一部分,请将其发布,如果需要,我会更新该帖子。

As information the file format is .glf作为信息,文件格式为 .glf

Thanks for the help谢谢您的帮助

Associate a file extension with your app in Windows, override the OnStartup method of your App.xaml and check the value of the StartupEventArgs.Args parameter. 将文件扩展名与 Windows 中的应用关联,覆盖App.xamlOnStartup方法并检查StartupEventArgs.Args参数的值。 It should contain the path to the file and it's then the responsibility of your app to handle it.它应该包含文件的路径,然后由您的应用程序负责处理它。

Associate a file extension with WPF application 将文件扩展名与 WPF 应用程序关联

Making my application to be the default one to open all .txt files 使我的应用程序成为打开所有 .txt 文件的默认应用程序

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM