Saturday, January 4, 2014

How to detect the Windows Phone theme is Dark or Light

 

private const string key = "PhoneDarkThemeVisibility"

private bool IsBackgroundDark()
{
return ((Visibility)Application.Current.Resources[key] == Visibility.Visible);
}