Adding New Page - Invalid Markup RRS feed

  • Question

  • Hello,

    I am trying to add a second page to my Windows 8 Store App, and I am getting a series of 16 errors, mostly related to the Common category.

    The errors say things like "LayoutAwarePage does not exist" and "member 'Resources' is not recognizable or is not accessible" and "Common.LayoutAwarePage is not defined" and "sub 'LoadState' cannot be declared 'Overrides' because it does not override a sub in a base class" etc.

    The design view has this heading on it:

    "Invalid Markup - Check the Error List for more information."

    I had previously edited the StandardStyles.xaml file in order to get the BottomAppBar feature to work on my original page. When this new page problem started, I tried to remark out the code which I had previously enabled for the BottomAppBar. Still no go.

    Is there an easy fix to get a second page to work? Such as delete the StandardsStyles.xaml file and try again? Or copy it from another project?

    Many thanks for your attention to this problem.



    • Edited by David VB2005 Sunday, November 10, 2013 9:38 PM spelling
    Sunday, November 10, 2013 9:37 PM


All replies

  • Hi ,

    To tell you the truth I never faced problems while adding a second page. But I believe it is somewhere in the specs not to change the StandardsStyles.xaml file.

    Have to tried to create a new solution and copy and paste the XAML in your current solution ? If you did that , are you still facing the issues ?

    If you create a new solution from scratch can you add second and third page without problems ?

    Below I give you a tip if you want to "play" with the standardstyles.

    If you want to change the styles  I would suggest the below

    Go to your App.XAML and change the below section


                        Styles that define common aspects of the platform look and feel
                        Required by Visual Studio project and item templates
                    <ResourceDictionary Source="Common/PrivateStandardStyles.xaml"/> <-- create a file of your own-->


    In your case it would say Standard....... So create a XAML page copy and paste from your original Standard XAMl and work and change from now on with your PrivateStandardStyles.XAML

    thank you

    Monday, November 11, 2013 6:45 AM
  • Thanks Zakkar, that is a great tip.

    I have since learned that I have to carefully follow the samples and tutorials related to app development, especially Parts 2 & 3 tutorials (http://msdn.microsoft.com/en-us/library/windows/apps/hh986968.aspx and http://msdn.microsoft.com/en-us/library/windows/apps/jj215600.aspx)



    • Edited by David VB2005 Tuesday, November 12, 2013 6:44 AM
    • Marked as answer by Anne Jing Tuesday, November 19, 2013 2:31 AM
    Tuesday, November 12, 2013 6:04 AM