简体   繁体   中英

Bing Maps SDK Dark Mode

I have an app that is in two formats: Windows Phone 8.1 Silverlight, and Windows 8.1 RT. It uses the Bing Maps SDK and I'd like to be able to programatically (based on user-preference) toggle between light and dark mode. I can get it working on the Silverlight Version via:

myMap.ColorMode = Microsoft.Phone.Maps.Controls.MapColorMode.Dark;
myMap.ColorMode = Microsoft.Phone.Maps.Controls.MapColorMode.Light;

But the ColorMode property isn't available on the Windows 8.1 RT version. The closest I can find is:

myMap.RequestedTheme = ElementTheme.Dark;
myMap.RequestedTheme = ElementTheme.Light;

And this doesn't seem to do anything. Any help would be appreciated here.

The Windows 8.1 map control doesn't have a dark mode. Also, that map control is deprecated in Windows 10. I would recommend targeting Windows 10, which is built on top of the Windows Phone 8.1 map control. The Windows 10 map control has a dark color scheme available: https://msdn.microsoft.com/en-us/library/windows/apps/xaml/windows.ui.xaml.controls.maps.mapcolorscheme.aspx Not sure if this changes the map style colors, but do know a "night" mode map is planned to be added to that control. In any case, if any Windows map control were to get this, it would be the Windows 10 map control as the Windows 8.1 map control is no longer being updated.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM