WinJS.UI.Pages.render function

Applies to Windows and Windows Phone

Creates a PageControl from the specified Uniform Resource Identifier (URI) and inserts it inside the specified Document Object Model (DOM) element.

Syntax


WinJS.UI.Pages.render(uri, element, options, parentedPromise).done( /* Your success and error handlers */ );

Parameters

uri

Type: String

The URI for the content that defines the page.

element

Type: DOMElement

The DOM element in which the PageControl is created.

options [optional]

Type: Object

An object that contains one or more property/value pairs to apply to the new PageControl. How these property/value pairs are used (or not used) depends on the implementation of that particular PageControl.

parentedPromise [optional]

Type: Promise

A Promise that is fulfilled when rendering of the new PageControl is complete and its content becomes the child of element.

Return value

Type: Promise

If asynchronous processing is necessary, a promise that is fulfilled when rendering is complete. Otherwise, nothing.

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1

Namespace

WinJS.UI.Pages

Library

Base.js

See also

For developers
WinJS.UI.Pages Namespace
Your first app - Part 3: PageControl objects and navigation
Navigating between pages
Quickstart: Using single-page navigation
Quickstart: Adding Page controls
Adding a Page control item template
HTML Page controls sample
Navigation and navigation history sample
For designers
Navigation patterns

 

 

Show:
© 2014 Microsoft