Edit: this is under Windows 7.1 RC. (This code really works for 7.0)
Let's say we open the app in a dark theme. A line of code to detect this will look like this:
isDarkTheme = (Visibility.Visible == (Visibility)Application.Current.Resources[StringResource.PhoneDarkThemeVisbility]);
In this case, isDarkTheme will be true. Now press the Windows key, change the theme to a light theme. and click the back button to return to your application. Repeat the following line of code (in the activated event)
isDarkTheme = (Visibility.Visible == (Visibility)Application.Current.Resources[StringResource.PhoneDarkThemeVisbility]);
Apparently isDarkTheme is still true, although we switched themes. Has anyone else encountered this problem or am I using the old way to check the current topic?
source share