wpf 控件旋转后鼠标拖动的问题
wpf,遇到一个棘手的问题,盼解答.问题如下,当通过RotateTransform将image旋转一定角度后(约60度),再移动image就飞了.请问有人遇到过这样的问题...
wpf,遇到一个棘手的问题,盼解答.
问题如下,当通过 RotateTransform 将 image旋转一定角度后(约60度),再移动image就飞了.请问有人遇到过这样的问题吗?如何解决,是什么原因??
代码如下:
xaml:
<Window x:Class="Wpf_Transform_test.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="530" Width="682">
<Grid>
<Canvas Width="660" Height="491">
<Image Height="69" HorizontalAlignment="Left" Margin="164,199,0,0" Name="image1" Stretch="Fill" VerticalAlignment="Top" Width="186" Source="/Wpf_Transform_test;component/bin/PD.png" MouseWheel="image1_MouseWheel" MouseLeftButtonDown="image1_MouseLeftButtonDown" MouseLeftButtonUp="image1_MouseLeftButtonUp" MouseMove="image1_MouseMove" Canvas.Left="-57" Canvas.Top="-3" />
</Canvas>
</Grid>
</Window> 展开
问题如下,当通过 RotateTransform 将 image旋转一定角度后(约60度),再移动image就飞了.请问有人遇到过这样的问题吗?如何解决,是什么原因??
代码如下:
xaml:
<Window x:Class="Wpf_Transform_test.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="530" Width="682">
<Grid>
<Canvas Width="660" Height="491">
<Image Height="69" HorizontalAlignment="Left" Margin="164,199,0,0" Name="image1" Stretch="Fill" VerticalAlignment="Top" Width="186" Source="/Wpf_Transform_test;component/bin/PD.png" MouseWheel="image1_MouseWheel" MouseLeftButtonDown="image1_MouseLeftButtonDown" MouseLeftButtonUp="image1_MouseLeftButtonUp" MouseMove="image1_MouseMove" Canvas.Left="-57" Canvas.Top="-3" />
</Canvas>
</Grid>
</Window> 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询