Hi, we are working with callout's in the map control. In the examples I see regarding this, the background color is white and the text is black. When I use a callout the background is white, but the text is also white (with a slightly different shade, so I'm able to tell that the correct text is there). How do I set the colors used in a callout?
kindly,
Thomas
I know this doesn't exactly answer your question, but if you want more control over your Callout, you can use the following:
public void ShowCalloutAt(MapPoint location, UIElement calloutContent, Point leaderOffset = default(Point));
This allows you to define your own UIElement, the appropriate bindings, etc, and can be used like this:
ShowCalloutAt(location, new MyFancyCalloutView()
{
DataContext = new MyFancyCalloutViewModel(feature, _featureTable),
// Obviously you can style this in xaml
Background = Brushes.PaleGoldenrod,
BorderBrush = Brushes.OliveDrab,
BorderThickness = new Thickness(2)
});
Did you set a global style on TextBlock? That could be what's happening here. You can use the Live Visual Tree explorer in Visual Studio 2017 to see what's really being rendered and where styles are coming from: https://blogs.msdn.microsoft.com/visualstudio/2015/02/24/introducing-the-ui-debugging-tools-for-xaml...
Hi Morten,
I used Snoop to get the value and edit it runtime, since I don't have VS2017 just yet. Anyway, your tip did lead me back on track - thanks a lot for the fast response
-
Thomas