Windows 8 Metro C#相机
-
13-12-2019 - |
题
我在Win8 Metro中遇到了Web Cams问题。 我想制作一个应用程序,它将绘制来自摄像头的照片。 不幸的是,我发现这个如何获得相机在Windows 8 Metro Style App中源?和应用程序只打开捕获,我只需要仅显示网络摄像头。谢谢你的答案。
解决方案
你的意思是这样的东西吗? windowsapps / cameracaptureui
其他提示
你可以使用 CaptureLement 将相机馈送集成在应用程序中。在XAML:
<CaptureElement x:Name="capElement" Width="400"></CaptureElement>
.
在代码后面,您需要激活源:
MediaCapture captureMgr = new MediaCapture();
await captureMgr.InitializeAsync();
capElement.Source = captureMgr;
await captureMgr.StartPreviewAsync();
. 不隶属于 StackOverflow