locked
Visual State <Base>

    Question

  • Why do I only have the <Base> state as my visual state options. I would like to code for snapped and filled visual states, but I can't do it via the UI in either Blend or VS. Please help.

    Wednesday, September 05, 2012 12:55 PM

Answers

  • Correction to Auresa's comments.  Blank app template *doesn't define* the visual states.  It perfectly has the ability to support it, you just need to define them.  Keep in mind that the Page element doesn't have these states defined in the control's definition which is why they aren't there always.

    Tim Heuer | Program Manager, XAML | http://timheuer.com/blog | @timheuer

    (if my post has answered your question, please consider using the 'mark as answer' feature in the forums to help others)

    • Marked as answer by mjhannaf Monday, September 10, 2012 12:12 PM
    Thursday, September 06, 2012 5:46 AM

All replies

  • What type of document do you currently have open? You likely need to have the proper document type open.
    Wednesday, September 05, 2012 2:38 PM
  • It's a xaml page. Created by choosing the blank page template.
    • Edited by mjhannaf Wednesday, September 05, 2012 4:33 PM
    Wednesday, September 05, 2012 4:33 PM
  • Blank page does not have the ability to change visual state options built into it (ie from FullScreenLandscape to Snapped). However BasicPage does so in the future after you create a Blank Project you can just add a new BasicPage item named MainPage.xaml and replace the natively created Blank Page and that will solve your problem.

    Assuming your application is complex enough that you don't want to start over from scratch you should be able to rename your MainPage to somethign random like "test", create a new BasicPage named MainPage.xaml and copy all of the Xaml code from your first MainPage to your new MainPage then delete "test".

    I have tried this and it seems to work on a small application but I suggest you try on a copy first.

    Wednesday, September 05, 2012 8:22 PM
  • Correction to Auresa's comments.  Blank app template *doesn't define* the visual states.  It perfectly has the ability to support it, you just need to define them.  Keep in mind that the Page element doesn't have these states defined in the control's definition which is why they aren't there always.

    Tim Heuer | Program Manager, XAML | http://timheuer.com/blog | @timheuer

    (if my post has answered your question, please consider using the 'mark as answer' feature in the forums to help others)

    • Marked as answer by mjhannaf Monday, September 10, 2012 12:12 PM
    Thursday, September 06, 2012 5:46 AM