双击视频或音频文件,并在我的WPF媒体元素中打开它? [英] Double click an video or audio file and have it open in my WPF mediaelement ?
问题描述
您好
我使用wpf创建媒体播放器.
但是我无法在项目中关联文件类型.
请告诉我如何申报?
我在这里看到一些问题,但我不明白.
请任何人告诉我如何解决这个问题.
如何在wpf项目中添加文件类型,然后双击这些文件&在我的中介人中打开它.
Hi
I create a media player using wpf.
But I can not associate file type on my project.
Please tell me how can I declare ?
I see some question here but I am not understood.
Please anybody tell me how can I solve this problem.
How can I add file types on my wpf project and double click those files & have it open in my mediaelement.
就像这样. 请参阅
这个例子
它以.
打开
当我双击视频文件&在KMPlayer上打开它.
但是如何在我的wpf媒体播放器项目中添加此过程?
Like this. See
this example
Its working open with .
When I double click video file & open it's on KMPlayer.
But how can I add this process on my wpf media player project?
Sabbir Ahmed
Sabbir Ahmed
推荐答案
您应该实现WPF应用程序以读取命令行参数,然后采取适当的措施,例如播放媒体在以下MSDN博客文章中建议使用MediaPlayer中的文件:
You should implement your WPF application to read command-line args and then take the appropriate action, such as for example playing a media file in a MediaPlayer, as suggested in the following MSDN blog post:
WPF:支持命令行参数和文件扩展名: 将特定文件扩展名与特定应用程序相关联的部分是设置/Windows.您可以按如下所述从ControlPanel执行此操作: http://www.digitaltrends.com/computing/how-to-set-default-programs-and-file-types-in-windows-10/
The part of associating a specific file extension with your particular application is a setting/Windows thing. You can do this from the ControlPanel as described here: http://www.digitaltrends.com/computing/how-to-set-default-programs-and-file-types-in-windows-10/
希望有帮助.
请记住,通过将有用的帖子标记为答案来关闭话题,然后在遇到新问题时开始新话题.请不要在同一线程中问几个问题.
Please remember to close your threads by marking helpful posts as answer and then start a new thread if you have a new question. Please don't ask several questions in the same thread.
这篇关于双击视频或音频文件,并在我的WPF媒体元素中打开它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!