HomeWindowsHow to Adjust the Map Control for Low Light Conditions in Windows Phone 8 App?

How to Adjust the Map Control for Low Light Conditions in Windows Phone 8 App?

There are times when the developer need to adjust the map control to suit the different conditions like day time or night time access. To achieve this, the Map Control in Windows Phone 8 exposes the ColorMode property which can be used to toggle between light and dark color mode.

How to Adjust the Map Control for Low Light Conditions in Windows Phone 8 App?

The ColorMode property takes one of the values

  • Microsoft.Phone.Maps.Controls.MapColorMode.Dark
  • Microsoft.Phone.Maps.Controls.MapColorMode.Light
How to Adjust the Map Control for Low Light Conditions in Windows Phone 8 App?
How to Adjust the Map Control for Low Light Conditions in Windows Phone 8 App?

Sample Code Snippet for setting the Color Mode for Map Control

XAML (MapControl)

<maps:Map x:Name="Map1" ColorMode="Dark" HorizontalAlignment="Left" Height="563" Margin="0,44,0,0" VerticalAlignment="Top" Width="446" Loaded="Map1_Loaded" />

C#

Map1.ColorMode = Microsoft.Phone.Maps.Controls.MapColorMode.Dark;

Leave a Reply

You May Also Like

This blog post will guide you through several effective methods to troubleshoot and resolve the issue of Microsoft Edge not...
Windows 11 offers a range of audio enhancements that can enrich your listening experience. These enhancements include features like virtual...
Windows 11 brings a fresh and visually stunning design to your desktop, and one of the standout features is the...