在Windows8桌面应用程序上使用MediaCapture在Windows8桌面应用程序上使用MediaCapture在Windows8桌面应用程序中,我需要使用C#4.5中的相机拍照。我曾尝试使用CameraCaptureUI类,但它不适用于桌面应用程序。所以我尝试使用MediaCapture类,它在Metro应用程序或桌面应用程序中可用。它的工作原理非常好,基于此处的示例:http://code.msdn.microsoft.com/windowsapps/media-capture-sample-adf87622/varcapture=newMediaCapture();//查找相机设备id以使用stringdeviceId="";vardevices=awaitWindows.Devices.Enumeration.DeviceInformation.FindAllAsync(Windows.Devices.Enumeration.DeviceClass.VideoCapture);对于(vari=0;i
