Silverlight ImageBrush لا تقدم (مع التحكم في خريطة Bing)
-
20-09-2019 - |
سؤال
أحاول إضافة صورة إلى مثيل Pushpin من التحكم في خريطة Silverlight Bing ربما يكون هذا سؤالا عاما 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);
المحلول
كنت قادرا على رؤية "myimage.png" المقدمة أعلى دافعتي طالما أضيفها إلى الخلفية.
pp.Background = imageBrush
لا تنتمي إلى StackOverflow