Thursday, March 15, 2012

Windows 8 Javascript - How To Detect Portrait and Snap Mode

url: http://hu1st.blogspot.com/2012/03/windows-8-javascript-how-to-detect.html

from: http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.viewmanagement.applicationview.value.aspx
ApplicationView.Value | value property
var value = Windows.UI.ViewManagement.ApplicationView.value;

Property value
Type: ApplicationViewState

The current state of the running app's view. This state indicates the orientation (landscape or portrait) and whether or not the app is snapped.

Requirements

Minimum supported clientWindows 8 Consumer Preview
Minimum supported serverWindows Server 8 Beta
Namespace
Windows.UI.ViewManagement
Windows::UI::ViewManagement [C++]
Metadata
Windows.winmd

See also

ApplicationView Snap sample

No comments: