我正在尝试从Silverlight Bing地图控件向一个Pushpin实例添加一个图像,但是我似乎无法让它渲染(图钉渲染得很好)。这可能是一个一般性的WPF问题,而不是任何特定于Pushpin对象的问题。
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);发布于 2009-11-14 11:49:19
只要我把"myImage.png“添加到背景中,我就能看到它渲染在我的图钉上。
pp.Background = imageBrushhttps://stackoverflow.com/questions/1733156
复制相似问题