C# 媒体捕获WinRT SetPreviewRotation正在工作,但导致显示问题。

C# 媒体捕获WinRT SetPreviewRotation正在工作,但导致显示问题。,c#,rotation,windows-runtime,webcam,C#,Rotation,Windows Runtime,Webcam,我在这里下载了示例: 我已经编译好了,一切都运行得很好。但是,我想旋转相机,使其处于纵向模式。查阅文档后,我发现以下代码: MediaCapture.SetPreviewRotationVideoRotation.Clockwise270度 和 MediaCapture.SetRecordRotationVideoRotation.Clockwise270度 我添加了上面的两行,它确实旋转了输出,这正是我想要的。唯一的问题是预览现在有一个橙色和蓝色的变形。录音机工作得很好 有什么想法吗 我最终使

我在这里下载了示例:

我已经编译好了,一切都运行得很好。但是,我想旋转相机,使其处于纵向模式。查阅文档后,我发现以下代码:

MediaCapture.SetPreviewRotationVideoRotation.Clockwise270度 和 MediaCapture.SetRecordRotationVideoRotation.Clockwise270度

我添加了上面的两行,它确实旋转了输出,这正是我想要的。唯一的问题是预览现在有一个橙色和蓝色的变形。录音机工作得很好


有什么想法吗

我最终使用以下代码进行预览:

 <Canvas x:Name="previewCanvas1" Width="576" Height="720" Background="Gray">

   <CaptureElement x:Name="previewElement1" Width="720" Height="576"   RenderTransformOrigin=".5,.5" >

     <CaptureElement.RenderTransform>
       <RotateTransform Angle="270" CenterX="0.5" CenterY="0.5" />
     </CaptureElement.RenderTransform>

   </CaptureElement>

</Canvas>