Part 16: Responding to Device Orientation Changes

Sign in to queue

Description

We head back to the LayoutAwarePage and discuss how it works with the VisualStateManager to allow us to declarative respond to changes in orientation on our user's device.
 

Embed

Download

Download this episode

The Discussion

  • User profile image
    EatDrinkCode

    Hi Bob. When we make VisualState.Name property "Snapped", we define how the application will be displayed in snapped mode. However, we didn't define what is "Snapped" nor "FullScreenPortrait" etc. Are they something like a keyword which windows 8 understands automatically? I hope I managed to explain what I wondered.

  • User profile image
    BobTabor

    @EatDrinkCode: It's been a couple of months since I looked at this ... if you supply a time marker (ex. @4:15) that would help refresh my memory.  However, it's probably one of two things off the top of my head ... it's either an enumeration built into the framework, or it's keying off the visual states defined in the XAML.  Again, this is just off the top of my head ... if you could help me out (I don't want to watch my own videos right now ... busy on the next project Smiley I could get a better answer for you.  Thanks! 

  • User profile image
    EatDrinkCode

    You are explaining VisualState object between 3:15 and 4:05. And good luck with your project :)

  • User profile image
    BobTabor

    @EatDrinkCode: Sorry it took so long to reply.  I'm sticking with what I said before.  In that part of the video, we're looking at XAML.  Remember from the XAML introduction: it's simply a declarative syntax that allows you to create instances and set properties of those instances of classes.  So, those classes were defined by Microsoft, and you're merely creating instances of those classes that handle VisualState, specifically, those classes that handle the various VisualStates.  Now, as to the exact implementation?  I'm not aware of any explanation beyond that how it was coded by Microsoft.  Hope that helps?

  • User profile image
    Masoud

    Thanks Mr. Tabor :) I'm downloading all the sessions
    It's a great tutorial

  • User profile image
    BobTabor

    Opening comments

Add Your 2 Cents