Hub.sectionOnScreen property

Applies to Windows only

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 supported client

Windows 8.1 [Windows Store apps only]

Minimum supported server

Windows Server 2012 R2 [Windows Store apps only]

Minimum supported phone

None supported

Namespace

WinJS.UI

Library

Ui.js

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

 

 

Show:
© 2014 Microsoft