C#嵌入VLC控件

编程入门 行业动态 更新时间:2024-10-23 09:29:33
本文介绍了C#嵌入VLC控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我试图将VLC嵌入到我的WPF项目中.我已经注册了axvlc.dll.还下载了VLC每晚构建版本2.2.2

I've tried to embed VLC into my WPF project. I've registered the axvlc.dll. Also downloaded VLC nightly build version 2.2.2

PresentationFramework.dll中发生类型为'System.Windows.Markup.XamlParseException'的第一次机会异常

A first chance exception of type 'System.Windows.Markup.XamlParseException' occurred in PresentationFramework.dll

其他信息:'在类型上调用构造函数匹配指定绑定约束的'Proj1.MainWindow'引发了异常.行号"3"和行位置"9".

Additional information: 'The invocation of the constructor on type 'Proj1.MainWindow' that matches the specified binding constraints threw an exception.' Line number '3' and line position '9'.

问题是我已经成功将VLC嵌入到另一个项目中.我还把PresentationFramework.dll更新到了较新的版本.为什么会出现此异常?在我的项目中,我只有一个带有windowsFormHost控件的窗口,仅此而已.这是我的代码:

The thing is that I already successfully embedded the VLC in another project. I've also updated the PresentationFramework.dll to newer version.. Why do I get this exception? At my project I've just a window with windowsFormHost control and that's it. Here's my code:

AxVLCPlugin2 vlc = new AxVLCPlugin2(); winFormHost.Child = vlc; vlc.CreateControl();

推荐答案

请尝试使用Vlc.DotNet.您可以从 github 中获取源代码和示例.

Kindly try Vlc.DotNet. You can get the source and samples from github.

即使在尝试将VLC插件嵌入到WPF项目中时,我也遇到了同样的问题.使用Vlc.DotNet后获得成功.

Even I was stuck with the same issue when trying to embed VLC plugin into my WPF project. Got success after using Vlc.DotNet.

更多推荐

C#嵌入VLC控件

本文发布于:2023-11-17 07:25:18,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1609291.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:控件   VLC

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!