【发布时间】:2012-06-25 14:06:03
【问题描述】:
我正在尝试在 windows phone 中获取图像的高度和宽度...但是几乎没有语法错误
我该怎么做?
int hight = image1.ActualHeight;
int width = image1.ActualWidth;
BitmapImage img = new BitmapImage(image1.Image);
BitmapImage newImg = new BitmapImage(hight,width);
【问题讨论】:
-
你的错误是什么,在哪一行?
-
所有行中的错误。无法使用 ActualHegiht n ActualWidth 然后在括号中再次出现错误
-
其中一个错误是 ActualWidth 和 ActualHeight 是双精度值。对局部变量使用 double 或将值转换为 int。提供有关 image1 的用法以及何时尝试执行您发布的代码的更多信息。
标签: c# silverlight windows-phone-7 windows-phone-7.1