Edit: This is under windows 7.1 RC. (This code did work for 7.0)
Lets say we open the application up in the dark theme. A line of code to detect this would be as follows:
isDarkTheme = (Visibility.Visible == (Visibility)Application.Current.Resources[StringResource.PhoneDarkThemeVisbility]);
In this case, isDarkTheme will be true. Now hit the windows key, change your theme to light theme. and hit the back button to go back to your application. Run the following line of code again (in your activated event)
isDarkTheme = (Visibility.Visible == (Visibility)Application.Current.Resources[StringResource.PhoneDarkThemeVisbility]);
Apparently isDarkTheme is still true even though we switched themes. Has anyone else ran into this problem or am I using an older way to check the current theme?