【发布时间】:2011-03-31 05:56:55
【问题描述】:
我正在尝试获取如下图像的高度
BitmapImage bitmap = new BitmapImage(new Uri("Images/header.png",UriKind.RelativeOrAbsolute));
Debug.WriteLine("bitmap.PixelHeight : " + bitmap.PixelHeight);
将高度打印为 0,但实际图像的高度为 35 像素。它不是从服务器加载的图像。它存储在应用程序包本身中。
【问题讨论】:
-
您以后在项目中使用您的位图吗?
标签: c# xaml silverlight windows-phone-7