locked
State recording option - VS2013 RRS feed

  • Question

  • Hello,

    In VS2012 there was an option in the xaml designer to enable state recording,  this made moving/displaying elements in both landscape and portrait a WHOLE lot easier.

    But I've just noticed in VS2013 that this option is no longer available and wondered if anyone knew why and if possible how to re-enable it?.  

    Unless the rules have changed meaning I don't have to waste my time creating a portrait view of my app any more just to please the certification team? :\

    Thanks

    Thursday, December 26, 2013 3:29 PM

Answers

  • Hi Inac,

    Windows 8.1 apps do not have the same concept of ApplicationView States as Windows 8 had and so the states are not coded directly into Blend and hardcoded in to the Device tab. You can record general purpose VisualStates in the States tab.

    You can set up your own VisualStates for layouts that make sense for your app. Typically these will be Landscape, Portrait, and Skinny, but you can add others as needed and can trigger them based on the window's SizeChanged event (see Quickstart: Designing apps for different window sizes ).

    Once you've defined these states you can visually edit them in Blend by recording on the States tab.

    --Rob

    • Marked as answer by Anne Jing Thursday, January 2, 2014 6:52 AM
    Friday, December 27, 2013 1:53 AM
    Moderator

All replies

  • Hi,

    Recording option is not available in VS2013. You can follow up these steps:Add a SizeChanged event handler to the page, handle the event, check if the height is greater than the width or vice versa, and switch between Portrait and Landscape states. You can see Quickstart: Designing apps for different window sizes to get more information.

    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    Friday, December 27, 2013 1:41 AM
  • Hi Inac,

    Windows 8.1 apps do not have the same concept of ApplicationView States as Windows 8 had and so the states are not coded directly into Blend and hardcoded in to the Device tab. You can record general purpose VisualStates in the States tab.

    You can set up your own VisualStates for layouts that make sense for your app. Typically these will be Landscape, Portrait, and Skinny, but you can add others as needed and can trigger them based on the window's SizeChanged event (see Quickstart: Designing apps for different window sizes ).

    Once you've defined these states you can visually edit them in Blend by recording on the States tab.

    --Rob

    • Marked as answer by Anne Jing Thursday, January 2, 2014 6:52 AM
    Friday, December 27, 2013 1:53 AM
    Moderator