A WindowsFormsHost cannot be rotated. To suppress this error, handle the LayoutError event and set ThrowException to false

白昼怎懂夜的黑 提交于 2020-01-06 04:37:14

问题


I have VLC ActiveX Plugin control inside of WPF.

<Grid> 
    <WindowsFormsHost  HorizontalAlignment="Stretch" Margin="0,0,0,0" Visibility="Hidden"   Name="windowsFormsHost1" VerticalAlignment="Stretch" ClipToBounds="True" SnapsToDevicePixels="True"  /> 
 </Grid> 

And when I try to apply some animation I am facing this error:

A WindowsFormsHost cannot be rotated. To suppress this error, handle the LayoutError event and set ThrowException to false. 

Any clue how we can fix it?


回答1:


That error is pretty straight forward. You simply can't rotate or resize WinFormsHost controls. See here.



来源:https://stackoverflow.com/questions/15571277/a-windowsformshost-cannot-be-rotated-to-suppress-this-error-handle-the-layoute

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!