2013-04-22 100 views
1

我引用WPFMediaKit.dll到我的项目,这是我的XAML:如何将wpf mediakit添加到我的项目中?

<Window x:Class="WPFCameraTest.Window2" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:Controls="clr-namespace:WPFMediaKit.DirectShow.Controls;assembly=WPFMediaKit" 
    Title="Window2" Height="300" Width="300"> 
<Grid> 
    <Controls:VideoCaptureElement ></Controls:VideoCaptureElement> 
</Grid> 

,但我得到的错误:

The name "VideoCaptureElement" does not exist in the namespace "clr-namespace:WPFMediaKit.DirectShow.Controls;assembly=WPFMediaKit".

什么,我逃课?

回答

0
  1. 是否有可能您写VideoCaptureElement错了!?!?!你写的:VideoCaputreElemnt
  2. ,我认为你必须与<WPFMediaKit:VideoCaptureElement >
+0

感谢您的回应1.“VideoCaptureElement”在尝试了很多事情但没有成功但是它不是问题之后是错误的;)2.“未找到类型'WPFMediaKit:VideoCaptureElement'” – 2013-04-22 09:28:59

+0

look here:http:/ /www.codeproject.com/Articles/111764/Mahhala-WPF-MediaKit – fecub 2013-04-22 10:02:27

+0

只有一个很好的采访开发者... – 2013-04-22 10:20:08

0

称之为参见维基词条的位置: https://github.com/Sascha-L/WPF-MediaKit/wiki

<WPFMediaKit:VideoCaptureElement 
x:Name="videoCapElement" 
LoadedBehavior="Play" 
DesiredPixelWidth="320" 
DesiredPixelHeight="240" 
Stretch="Fill" 
VideoCaptureSource="{Binding Path=CaptureDeviceName}" 
FPS="30" 
/> 
0

<Controls:VideoCaptureElement>作品对我来说〜

你有没有加入“ WPF MediaKit“引用您的项目? 并确保WPF MediaKit中存在“VideoCaptureElement.cs”?

0

不要通过dll文件添加引用。

使用Nuget Package并寻找WPFMediaKit并添加它。

相关问题