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

Hub

indexOfFirstVisible

HubSection

AppBar

NavBar

BackButton

Your first app - Part 3: PageControl objects and navigation

Quickstart: Using a hub control for layout and navigation

Navigating between pages (HTML)

Adding app bars

Adding nav bars

HTML Hub control sample

HTML AppBar control sample

HTML NavBar control sample

Navigation and navigation history sample

Designers

Command patterns

Navigation patterns

Hub

Guidelines for the hub control