当我放大图像时,我在运行时收到此错误消息。
这是XAML代码
<Grid x:Name="LayoutRoot" Background="Transparent">
<toolkit:GestureService.GestureListener>
<toolkit:GestureListener
PinchStarted="OnPinchStarted"
PinchDelta="OnPinchDelta"
DragDelta="OnDragDelta"
Flick="GestureListener_Flick">
</toolkit:GestureListener>
</toolkit:GestureService.GestureListener>
<Image x:Name="ImgZoom" Source="Image.jpg" HorizontalAlignment="Left" Width="480" Height="770" Stretch="Fill" Margin="0,0,0,0" VerticalAlignment="Top"/>
</Grid>
答案 0 :(得分:2)
您需要在xaml中定义RenderTransform
<Image x:Name="ImgZoom" Source="Image.jpg" HorizontalAlignment="Left" Width="480" Height="770" Stretch="Fill" Margin="0,0,0,0" VerticalAlignment="Top">
<Image.RenderTransform>
<CompositeTransform/>
</Image.RenderTransform>
</Image>