0
我想在silverlight中生成一個圖像,但由於某種原因它沒有顯示。在Silverlight中顯示圖像的問題
這裏是我使用
Image fireBall = new Image();
Uri imageUri = new Uri("/Yambushi;Images/Projectiles/Fireball.png", UriKind.Relative);
fireBall.Source = new BitmapImage(imageUri);
cnvGame.Children.Add(fireBall);
fireBall.SetValue(Canvas.LeftProperty, Convert.ToDouble(100)); //(Doll left property)
fireBall.SetValue(Canvas.TopProperty, Convert.ToDouble(100));
fireBall.Height = 30;
fireBall.Width = 30;
Yambushi是解決方案的名稱和cnvGame畫布我想在顯示圖像的代碼。PNG文件生成操作設置爲內容