程序运行效果:
程序调用DLL:http://files.cnblogs.com/wrl-wuqingxue/UICameraAssembly.zip
关键代码:
1 xmlns:UICamera="clr-namespace:UICamera;assembly=UICameraAssembly" ---相关dll调用
2 ........
3 <UICamera:CapPlayer x:Name="webcamPlayer" Stretch="Fill" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
4 Device="{Binding Path=SelectedWebcam}" Rotation="{Binding Path=WebcamRotation}">
5 <UICamera:CapPlayer.RenderTransform>
6 <TransformGroup>
7 <ScaleTransform ScaleX="-1" ScaleY="1" />
8 <TranslateTransform X="{Binding Path=ActualWidth,ElementName=webcamPlayer}" Y="0" />
9 </TransformGroup>
10 </UICamera:CapPlayer.RenderTransform>
11 </UICamera:CapPlayer>
相关参数后台设置:
?
1 2 3 4 5 6 |
|
程序源代码:http://files.cnblogs.com/wrl-wuqingxue/WPF_Camera.zip
时间: 2024-11-07 23:14:08