locked
The member "RequestedTheme" is not recognized or is not accessible.

    Question

  • Hello !

    I have searched high and low, and found that to change my newly created Windows (Phone) 8 app's theme, I have to add the following attribute to my application in the app.xaml:

    <Application
        x:Class="PhoneApp2.App"
        xmlns="schemas.microsoft.com/winfx/2006/xaml/presentation"    
        xmlns:x="schemas.microsoft.com/winfx/2006/xaml"
        xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
        xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
        RequestedTheme="Light" >

    (The theme URIs actially do contain the http slash slash prefix, but the forum won't let me include links with my lowbie account)

    However, I get the following error:

    Error 3 The property 'RequestedTheme' does not exist on the type 'Application' in the XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation'.

    Neither do the RequestedTheme exists in code for the Application, App or Current.

    I'm quite new to app development on Windows 8 and I'm a bit counfused, probably I'm missing something.

    Could you please point me into the right direction?

    Thank you,

    Balazs

    Sunday, November 11, 2012 9:31 PM