在Windows Phone 8

时间:2015-06-12 06:30:07

标签: c# windows-phone-8

我已经关注msdn link

但问题出在TrasformedBitmap上。 错误说

  

无法找到类型或命名空间名称“TransformedBitmap”

我不明白为什么会弹出这个错误,因为我已经包含了名称空间,System.Windows.Media.ImagingPresentationCore assembly也在那里。

1 个答案:

答案 0 :(得分:0)

看起来不推荐使用Transformed Bitmap你现在可以尝试将BitmapImage设置为Image控件并使用

旋转该图像
MyImageControl.Source= new BitmapImage(new Uri("ms-appx:///Assets/SmallLogo.scale-240.png", UriKind.RelativeOrAbsolute));

RotateTransform myRotateTransform = new RotateTransform();
myRotateTransform.Angle=30;
MyImageControl.RenderTransform = myRotateTransform;

proof of it rotating on center axis