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

Your email address will not be published. Required fields are marked *

You May Also Like

In this post, you’ll learn about the Win32 Error “0x000019E5 – ERROR_COULD_NOT_RESIZE_LOG” that you get when debugging system erors in...
In this post, you’ll learn about the error “CO_E_DBERROR 0x8004E02B” that is returned when working with COM based APIs or...
In this post, you’ll learn about the Win32 Error “0x000019D0 – ERROR_LOG_BLOCK_VERSION” that you get when debugging system erors in...