Coffeehouse Post

Single Post Permalink

View Thread: Visual Studio 2012 Windows Store App Simulator
  • User profile image

    , Bas wrote

    *snip*...but what's this about recording changes automatically? Is there a tutorial or video somewhere?

    No, but I'm recording some videos and I want to make sure to show this feature!

    • First, start with a Basic Page template (since it includes states like the snapped state)
    • In the Basic page template, add, say, a StackPanel with Orientation = Horizontal and three images.
    • Turn on Device, and simulate the snapped view. Images 2 & 3 should be cut off because of the orientation is set to Horizontal
    • Now click the checkbox to record changes. The border around the designer changes to red (similar to Blend) to let you know that whatever properties you change now will only happen in Snapped View.
    • Select the Stackpanel (use Document Outline if it's a pain to select), go to properties and change the orientation to Vertical. All of the images should now show since they are vertical.
    • Turn off recording and run the app. Notice how switching to Snapped view auto-magically changed the StackPanel orientation and you were able to do this all in a GUI! Underneath the covers, you'll find the code to do it in the Visual State Manager if you need to tweak it.

    Very cool stuff