-ms-view-state media feature

3 out of 4 rated this helpful - Rate this topic

Describes the view-state of the Windows Store app using JavaScript.

Possible values

  • Value:fullscreen-landscape | filled | snapped | fullscreen-portrait
  • Applies to: bitmap media types
  • Accepts min/max prefixes: no

One of the following values.

ValueDescription

fullscreen-landscape

Indicates the device is in landscape orientation and the app's client area is the same height and width as the device's height and width. That is, the app takes up the full screen.

filled

Indicates the device is in landscape orientation, the application's height and width is less than the device's height and width, and the application is not in the snapped state. That is, the current app's view has been reduced to a partial screen view because another app is in the snapped state.

snapped

Indicates the device is in landscape orientation, the application's height and width is less than the device's height and width, and the application is in the snapped state.

fullscreen-portrait

Indicates the device is in portrait orientation and the application's height and width is equal to the device's height and width. That is, the app takes up the full screen.

 

Remarks

The -ms-view-state media feature is new in Windows 8, and can only be used in Windows Store apps using JavaScript.

Examples

The following example shows each of the -ms-view-state values in use. All of them included in the default templates for Windows Store apps using JavaScript.


@media screen and (-ms-view-state: fullscreen-landscape) {
  ...
}
@media screen and (-ms-view-state: filled) {
  ...
}
@media screen and (-ms-view-state: snapped) {
  ...
}
@media screen and (-ms-view-state: fullscreen-portrait) {
  ...
}

 

 

Build date: 11/29/2012

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.