locked
Problem about theme adaption when switching applications RRS feed

  • Question

  • Now I'm trying to do something about theme adaption when switching applications, but I came cross some problems.

    As we all know, WP7 System has two background theme, dark and light. If now the system's background theme is dark and now my application is running. Then a call comes, I have to switch my application to the backstage. After I finish handling the phone,  I want to change my theme to light and so do it. But When i switch my application back, its theme is still dark. How could it adapt the system's changes?

    I tried to get the system current theme when my application activated,  but cannot. The following code still return the theme before changing. why?

       Visibility darkBackgroundVisibility =(Visibility)Application.Current.Resources["PhoneDarkThemeVisibility"];

                if (darkBackgroundVisibility == Visibility.Visible)

                {

                    MessageBox.Show("DARK!!!");

                }

                else

                {

                    MessageBox.Show("LIGHT!!!");

                }

    Wish someone could help me!Thanks for any help!

    • Moved by Wang Huang Wednesday, August 31, 2011 6:54 AM off topic (From:Suggestions and Feedback for the Forums)
    Tuesday, August 30, 2011 10:06 AM

All replies