Search code examples
c#windows-phone-8windows-phone-8-emulator

How to force windows phone 8 app to be run in light theme


I have developed a windows phone application, i want that app to be run in light theme, irrespective of what user have set. means is there any way to set a default theme for the windows phone 8 app.


Solution

  • You can use Jeff Wilcox's ThemeManager

    Add it to your project (there is a NuGet package available) and call it from App() constructor.

    public App()
    {
        // Global handler for uncaught exceptions.
        UnhandledException += Application_UnhandledException;
    
        // Standard Silverlight initialization
        InitializeComponent();
    
        // Phone-specific initialization
        InitializePhoneApplication();
    
        ThemeManager.ToLightTheme();
    
        // Other code that might be here already...
    }
    

    You can find usage example on his website.