有没有简单的方法可以在Windows Phone上旋转图像?
我正在尝试创建漫画查看器,这是我的问题:
I'm trying to create a comic viewer, and here's my problem:
我在滚动查看器中有一个图像,如果要获取图像源,则可以将该源附加到图像上,但是图像是伸展的,并且如果对其进行转换,图像将不可用.屏幕,由于某种原因,它真的很小. 它镜像了图像,文本向后
I have an image inside a scroll viewer, if I go fetch the image source I can attach that source to the image just fine, but the picture is stretch out, and if I do a transform on it the image goes off the screen and it becomes really small for some reason.or it mirrors the image and the text is backwards
我附上一张我想完成的图片,以前有人做过这样的事情吗?
I attached a picture of what I want to accomplish, has someone done something like this before?
我正在使用滚动查看器,因为图像大于屏幕,并且我想查看所有图像.
I'm using the scroll viewer since the image is bigger than the screen and I want to see all of it.
XAML:
< Grid x:Name ="ComicPanel"; Grid.Row ="1".保证金="12,0,12,0&">
< ScrollViewer Height ="762"; HorizontalAlignment =左"保证金="0,6,0,0&";名称=图像" VerticalAlignment =顶部"宽度="456">
<图片 x:Name ="image1";拉伸=填充" RenderTransformOrigin ="0.5,0.5". >
</图片>
</ScrollViewer>
</Grid>
<Grid x:Name="ComicPanel" Grid.Row="1" Margin="12,0,12,0">
<ScrollViewer Height="762" HorizontalAlignment="Left" Margin="0,6,0,0" Name="Image" VerticalAlignment="Top" Width="456">
<Image x:Name="image1" Stretch="Fill" RenderTransformOrigin="0.5,0.5" >
</Image>
</ScrollViewer>
</Grid>
代码:
谢谢.
这是我要完成的事情的图片
Here's a picture of what I want to accomplish
  ;
更改Stretch的值.保持ScrollViewer并设置Stretch ="None"(图像将以其原始大小显示),或者移除ScrollViewer并设置Stretch ="Uniform". (图像会自动调整大小以适合屏幕).
Change the value of Stretch. Keep the ScrollViewer and set Stretch="None"(the image will be shown in its original size) or remove the ScrollViewer and set Stretch="Uniform" (the image will automaitcally be resized to fit on the screen).
您为什么要添加图像?如果您的页面同时支持横向和纵向模式,则会自动旋转.
Why do you want to totate the image? If your page supports both landscape and portrait, it rotates automatically.
但是,如果您确实需要按代码旋转,则尝试将Stretch ="None"设置为0.并使用CompositeTransform进行旋转和缩放-这仅仅是因为我从未经历过RotateTransform可以镜像的图像.
However, if you really need to rotate by code, then try to set Stretch="None" and do both rotating and scaling with a CompositeTransform - that's just because I never experienced an image to be mirrored by RotateTransform.