EN
このコンテンツは設定された言語で表示できません。英語版のページが表示されます。

ListView.loadingBehavior property

Applies to Windows and Windows Phone

Gets or sets a value that specifies how the ListView fetches items and adds and removes them to the Document Object Model (DOM). Don't change the value of this property after the ListView has begun loading data.

Syntax


<div 
    data-win-control="WinJS.UI.ListView" 
    data-win-options="{ loadingBehavior : 'value'}" >
</div>


var loadingBehavior = listView.loadingBehavior;
listView.loadingBehavior = loadingBehavior;

Property value

Type: String

One of the following values:

ValueCondition
"randomaccess"

The ListView calculates the amount of items to show based on the number of items that can be displayed and the total amount of items. The ListView loads enough items to display the current page as well as the next page and the preceding page. This is the default value.

"incremental"

The ListView loads as many pages of items as specified by the pagesToLoad property. When automaticallyLoadPages is true, the items are loaded when the user is within the threshold scrolling amount (specified by pagesToLoadThreshold) of the end of the loaded portion of the list. When automaticallyLoadPages is false, you can manually load pages by calling the loadMorePages method. Note that, when using this mode, the ensureVisible method won't work for items that haven't loaded yet.

The ListView does not support grouped lists when the loadingBehavior is "incremental".

 

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

Library

Ui.js

See also

ListView
automaticallyLoadPages
loadMorePages
pagesToLoad
pagesToLoadThreshold

 

 

表示:
© 2014 Microsoft