render function
Collapse the table of content
Expand the table of content

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.


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



Type: String

The URI for the content that defines the page.


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.


Minimum WinJS version

WinJS 1.0



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



© 2017 Microsoft