如何将wpf mediakit添加到我的项目中?
我在项目中引用了WPFMediaKit.dll,这是我的xaml:如何将wpf mediakit添加到我的项目中?,wpf,xaml,media-player,wpf-mediakit,Wpf,Xaml,Media Player,Wpf Mediakit,我在项目中引用了WPFMediaKit.dll,这是我的xaml: <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:WPFMediaKi
<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>
但我得到了一个错误:
名称VideoCaptureElement在命名空间clr命名空间中不存在:WPFMediaKit.DirectShow.Controls;组装=WPFMediaKit
我跳过了什么
有没有可能是你把VideoCaptureElement写错了!?!?!你写:VideoCaputReelement
我想你必须把它叫做
请参见此处的wiki条目:
为我工作~
您是否已将WPF MediaKit引用添加到您的项目中?
并确保WPF MediaKit中存在VideoCaptureElement.cs?不要通过dll文件添加引用
使用Nuget软件包,查找WPFMediaKit并添加它。感谢您的回复1。VideoCaptureElement在尝试了许多事情但没有成功后是一个错误,但它不是问题所在;2.找不到类型“WPFMediaKit:VideoCaptureElement”
<WPFMediaKit:VideoCaptureElement
x:Name="videoCapElement"
LoadedBehavior="Play"
DesiredPixelWidth="320"
DesiredPixelHeight="240"
Stretch="Fill"
VideoCaptureSource="{Binding Path=CaptureDeviceName}"
FPS="30"
/>