ViewBox object
TOC
Réduire la table des matières
Développer la table des matières

WinJS.UI.ViewBox object

[This documentation is preliminary and is subject to change.]

Applies to: Metro style apps only

Scales a single child element to fill the available space without resizing it. This control reacts to changes in the size of the container as well as changes in size of the child element. For example, a media query may result in a change in aspect ratio.

Syntax


<div data-win-control="WinJS.UI.ViewBox"></div>


var object = new WinJS.UI.ViewBox();

Members

The ViewBox object has these types of members:

Methods

The ViewBox object has these methods.

MethodDescription
ViewBox constructor

Initializes a new instance of the ViewBox control.

 

Properties

The ViewBox object has these properties.

PropertyDescription

element Property

Gets the DOM element that functions as the scaling box.

 

Styling the ViewBox

CSS classes

To customize a ViewBox, you can define your own styles for these CSS classes (defined by the Windows Library for JavaScript style sheets):

CSS classDescription

win-viewbox

Styles the entire ViewBox control.

 

Requirements

Minimum supported client

Windows 8 Consumer Preview

Minimum supported server

Windows Server 8 Beta

Namespace

WinJS.UI

Library

Ui.js

 

 

Build date: 2/10/2012

Ajouts de la communauté

AJOUTER
Afficher:
© 2017 Microsoft