0
我想從Silverlight Bing地圖控件添加圖像到圖釘實例,但我似乎無法讓它呈現(圖釘渲染罰款)。這可能是一個普通的WPF問題,而不是特定於Pushpin對象的任何事情。Silverlight ImageBrush沒有呈現(與Bing地圖控制)
Pushpin pp = new Pushpin();
...
Uri imageUri = new Uri(@"myImage.png", UriKind.Relative);
BitmapImage image = new BitmapImage(imageUri);
ImageBrush imageBrush = new ImageBrush();
imageBrush.ImageSource = image;
pp.Foreground = imageBrush;
myMap.Children.Add(pp);