(X) Hide this
    • Login
    • Join
      • Generate New Image
        By clicking 'Register' you accept the terms of use .

How to manage orientation in Windows Phone using VisualStateManager

(0 votes)
0 comments   /   posted by Silverlight Show on Apr 30, 2013
Tags:   windows-phone , matteo-pagani
Read original post by Matteo Pagani at Qmatteoq.com

When I started to play with Windows Store apps development for Windows 8, one of the things I liked most was the base LayoutAwarePage class, from which every page inherits from. This class introduces a built in support for managing the different visual states of the page using the VisualStateManager: every time the page state changes (Portrait, Landscape, Snapped or Filled), a specific state is triggered so, as a developer, it’s really easy to apply animation and changes the layout of the page.

Unfortunately, this built in helper is missing in Windows Phone, so you have to manually manage the orientation from portrait to landscape or vice versa: Windows Phone is able to, automatically, arrange the controls when the orientation is changed, but often isn’t enough because you want to deeply change the layout of the page according to the orientation.


Comments

No comments

Add Comment

Login to comment:
  *      *       

Our News on Twitter