ThinkGeo.com    |     Documentation    |     Premium Support

Changing backgroundOverlay brush doesn't work

I’m simply trying to change the color of the map background. I’ve done this in the WinForms version fine.

private void Map_Loaded(object sender, RoutedEventArgs e)
{
    Map.MapUnit = GeographyUnit.DecimalDegree;
    Map.MapResizeMode = ThinkGeo.MapSuite.Shapes.MapResizeMode.PreserveScaleAndCenter;
    BackgroundOverlay backgroundOverlay = new BackgroundOverlay();
    backgroundOverlay.BackgroundBrush = new GeoSolidBrush(GeoColor.GeographicColors.DeepOcean);
    Map.BackgroundOverlay = backgroundOverlay;
    Map.Refresh();
}

The map stays white, but looking at the watchlist, it shows the backgroundbrush set to the correct color. I have the same exact code in the winforms version and it works. What could the issue be?

Hi Dan,

Thanks to let us know it, I tested it and also found the BackgroundOverlay don’t works in the latest version, I have let our developer know it and it will be solved after they back from vacation next week.

You can use the code as below instead of BackgroundOverlay:

map.Background = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Colors.LightBlue);

Wish that’s helpful.

Regards,

Ethan

Yup that’ll work for now, thanks!

Hi Dan,

We will check this issue ASAP, if there is any update, we will let you know here.
Before we fixed that, you can use this workaround Ethan mentioned above.

Thanks
Mark

Hi Dan,

Our developer had fixed it, please get the latest package for it: MapSuiteDesktopForWpf 11.0.0-beta062

Regards,

Ethan