1.Microsoft.Windows.SDK.Contracts
2.MMaitre.MediaCaptureWPF
<Grid Grid.Row="1"> <Image Width="400" Height="400" HorizontalAlignment="Stretch" x:Name="preview" Margin="130 0 0 0" > <Image.Clip> <!--设置图像如何显示--> <EllipseGeometry RadiusX="150" RadiusY="150" Center="150,150"/> </Image.Clip> </Image> </Grid>
captureManager = new MediaCapture();
await captureManager.InitializeAsync();
var preview1 = new CapturePreview(captureManager);
this.preview.Source = preview1;
await preview1.StartAsync();