Hub.sectionOnScreen property
Gets or sets the index of the first visible HubSection.
Syntax
<div
data-win-control="WinJS.UI.Hub"
data-win-options="{ sectionOnScreen : value}" >
</div>
var sectionOnScreen = hub.sectionOnScreen;
hub.sectionOnScreen = sectionOnScreen;
Property value
Type: ****
The index of the first visible HubSection.
Remarks
This property is useful for launching the hub on the specific section.
Note Although you can use the sectionOnScreen property to restore the Hub to a certain section, it doesn't allow you to maintain exact pixel fidelity. For resuming from the same position when navigating back (not from a suspended state), use the widths of sections or the Hub.scrollPosition property.
Requirements
Minimum WinJS version |
WinJS 2.0 |
Namespace |
WinJS.UI |
See also
Your first app - Part 3: PageControl objects and navigation
Quickstart: Using a hub control for layout and navigation
Navigating between pages (HTML)
Navigation and navigation history sample
Designers
Guidelines for the hub control