locked
Part 1: Create a Hello World App - Cannot change the Style of the TextBlock RRS feed

  • Question

  • I am following this tutorial for creating a Hello World App.



    In the To style an element section, I cannot perform step# 6 because System Resource is greyed out for me just like Local Resource is greyed out in the image below step# 6. 

    I tried to paste the XAML directly into MainPage.xaml file and rebuilt the project but I get 3 errors. 

    <TextBlockText="What's your name?" Style="{ThemeResource BaseTextBlockStyle}"/>



    What could be the problem?

    ERRORS:


    Error 1 ThemeResource is not supported in a Windows App project. ..\documents\visual studio 2012\Projects\HelloWorld\HelloWorld\MainPage.xaml 41 49 HelloWorld

    Error 2 The type 'ThemeResource' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. ..\documents\visual studio 2012\Projects\HelloWorld\HelloWorld\MainPage.xaml 41 56 HelloWorld

    Error 3 Unknown type 'ThemeResource' in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation' ..\documents\visual studio 2012\Projects\HelloWorld\HelloWorld\MainPage.xaml 41 49 HelloWorld
    • Edited by NewestNoob Sunday, September 15, 2013 12:28 PM
    Sunday, September 15, 2013 12:27 PM

Answers

  • ThemeResources are new in windows 8.1 and not working in windows 8 apps

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    • Marked as answer by NewestNoob Sunday, September 15, 2013 7:10 PM
    Sunday, September 15, 2013 6:02 PM

All replies

  • ThemeResources are new in windows 8.1 and not working in windows 8 apps

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    • Marked as answer by NewestNoob Sunday, September 15, 2013 7:10 PM
    Sunday, September 15, 2013 6:02 PM
  • Hi,

    Created a new blank Windows Store App from VS 2013 RTM, and i get the same error.

    What's weird is that i get the error from TFS build continuous integration only, not from VS build.

    The app launch and run on my local 8.1 RTM machine.

    EDIT:

    Looks like it's related to TFS Online Build Controller. For now, the latest build controller supplied by MS is Windows 8.1 Preview Controller. The Windows 8.1 RTM Controller is not available yet.


    "Find a job you love and you’ll never have to work a day in your life" Confucius


    • Edited by Louliloul Tuesday, September 24, 2013 4:36 PM Found reason
    Tuesday, September 24, 2013 3:49 PM
  • Can I use ThemeResource in Windows App with SilverLight version 8.1? Or Windows App with SilverLight 8.1 is equal to Windows 8.1?
    Thursday, February 19, 2015 8:06 AM
  • When I Use the Following Code Snippet in my xaml,I 3 got the errors

    Background="{ThemeResource SystemColorControlAccentColor}"

    Error 1 The name "ThemeResource" does not exist in the namespace "http://schemas.microsoft.com/client/2007". C:\project\February\18-2-2015\APPGOTTALENT - Copy\gizmeontechnologies_appgottalentwindows\APPGOTTALENT\Home.xaml 15 4 APPGOTTALENT

    Error 2 The type 'ThemeResource' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. C:\project\February\18-2-2015\APPGOTTALENT - Copy\gizmeontechnologies_appgottalentwindows\APPGOTTALENT\Home.xaml 15 16 APPGOTTALENT

    Error 152 The tag 'ThemeResource' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation'. C:\project\February\18-2-2015\APPGOTTALENT - Copy\gizmeontechnologies_appgottalentwindows\APPGOTTALENT\Home.xaml 15 17 APPGOTTALENT

    Thursday, February 19, 2015 8:12 AM