Microsoft Silverlight 2.0 その3
■ このスレッドは過去ログ倉庫に格納されています
0810デフォルトの名無しさん
2009/05/19(火) 12:25:15BitmapImage bmp;
Image img;
double bmpWidth;
double bmpHeight;
public Page()
{
InitializeComponent();
Uri uri = new Uri("http://www.google.co.jp/images/nav_logo4.png", UriKind.Absolute);
bmp = new BitmapImage(uri);
bmp.DownloadProgress += new EventHandler<DownloadProgressEventArgs>(bmp_DownloadProgress);
img = new Image();
img.Source = bmp;
}
void bmp_DownloadProgress(object sender, DownloadProgressEventArgs e)
{
if (e.Progress == 100) {
Dispatcher.BeginInvoke(
delegate() {
bmpHeight = imgg.ActualHeight;
bmpWidth = img.ActualWidth;
}
);
}
}
とりあえずこうやれば取得できる。
■ このスレッドは過去ログ倉庫に格納されています