Displays data items in a customizable list or grid.
Creates a new ListView.
The DOM element that hosts the ListView control.
An object that contains one or more property/value pairs to apply to the new control. Each property of the options object corresponds to one of the control's properties or events. Event names must begin with "on". For example, to provide a handler for the selectionchanged event, add a property named "onselectionchanged" to the options object and set its value to the event handler.
Gets or sets a value that indicates whether the next set of pages is automatically loaded when the user scrolls beyond the number of pages specified by the pagesToLoadThreshold property.
Gets or sets an IListViewItem that indicates which item should have keyboard focus and the focus state of that item.
Gets the HTML element that hosts this ListView.
Gets or sets the data source that contains the groups for the items in the itemDataSource.
Gets or sets how the ListView reacts when the user taps or clicks a group header.
Gets or sets the Template or function that creates the DOM elements for each group header in the groupDataSource. Each group header can contain multiple elements, but it must have a single root element.
Gets or sets the first visible item.
Gets the index of the last visible item in the ListView.
Gets or sets the data source that provides the ListView with items.
Gets or sets the WinJS.Binding.Template or templating function that creates the DOM elements for each item in the itemDataSource. Each item can contain multiple elements, but it must have a single root element.
Go Gets or sets a value that specifies whether items can be dragged. When this is set to true the ListView provides built in behaviors related to item dragging.
Gets or sets whether the ListView control's items can be reordered within itself by dragging and dropping.
Gets or sets an object that controls the layout of the ListView.
Gets or sets a value that specifies how the ListView fetches items and adds and removes them to the DOM. Don't change the value of this property after the ListView has begun loading data.
Gets a value that indicates whether the ListView is still loading or whether loading is complete.
Gets or sets the maximum number of realized items.
Gets or sets the number of pages to load when the loadingBehavior property is set to "incremental" and the user scrolls beyond the threshold specified by the pagesToLoadThreshold property.
Gets or sets the threshold (in pages) for initiating an incremental load. When the last visible item is within the specified number of pages from the end of the loaded portion of the list, and if automaticallyLoadPages is true and loadingBehavior is set to "incremental", the ListView initiates an incremental load.
Gets or sets the function that is called when the ListView discards or recycles the element representation of a group header.
Gets or sets the function that is called when an item is removed, an item is changed, or an item falls outside of the realized range of the ListView.
Gets or sets the distance, in pixels, of the start of the viewable area within the viewport.
Gets an ISelection that contains the range of currently selected items.
Gets or sets the selection mode of the ListView.
Gets or sets how the ListView reacts to the swipe gesture. The swipe gesture can select the swiped items or can have no effect on the current selection.
Gets or sets how the ListView reacts when the user taps or clicks an item.
Gets a ZoomableView that supports semantic zoom functionality. This API supports the SemanticZoom infrastructure and is not intended to be used directly from your code.
Registers an event handler for the specified event.
The name of the event to handle. See the ListView object page for a list of events. Note that you drop the "on" when specifying the event name for the addEventListener method. For example, instead of specifying "onselectionchange", you specify "selectionchange".
The event handler function to associate with the event.
Set to true to register the event handler for the capturing phase; otherwise, set to false to register the event handler for the bubbling phase.
Raises an event of the specified type and with additional properties.
The type (name) of the event.
The set of additional properties to be attached to the event object when the event is raised.
boolean
true if preventDefault was called on the event, otherwise false.
Releases resources held by this object. Call this method when the object is no longer needed. After calling this method, the object becomes unusable.
Returns the DOM element that represents the item at the specified index.
The index of the item.
HTMLElement
The DOM element that represents the item at the specified index.
Makes the item at the specified index visible. If necessary, the ListView will scroll to the item.
The index of the item to scroll into view.
Forces the ListView to update its layout. Use this function when making the ListView visible again after its style.display property had been set to "none".
Returns the index of the item that the specified DOM element displays.
The DOM element that displays the item.
number
The index of the item displayed by element.
Loads the next set of pages if the ListView control's loadingBehavior is set to "incremental" (otherwise, it does nothing). The number of pages to be loaded is determined by the pagesToLoad property.
Occurs when the ListView is about to play an entrance or contentTransition animation.
An object that contains information about the event. The detail property of this object contains the following sub-properties: detail.type, detail.setPromise.
Raised when the user taps or clicks a group header.
An object that contains information about the event. The detail property of this object contains the following sub-properties: detail.groupHeaderIndex, detail.groupHeaderPromise.
Raised when the ListView is a drop target and the onitemdragenter has been disabled. This is raised every time the cursor is moved between a new pair of items. If you call preventDefault on this event, then the ListView does not move the items slightly above/below the cursor to provide visual feedback for a drop.
An object that contains information about the event. The detail property of this object contains additional information about the event.
Raised when the user is dragging an item from the ListView and the datasource changes while the user is dragging.
An object that contains information about the event. The detail property of this object contains additional information about the event.
Raised when an item is dropped onto the ListView as the result of a drag operation.
An object that contains information about the event. The detail property of this object contains the following sub-properties: detail.dataTransfer, detail.index, detail.insertAfterIndex.
Raised when the user drops an item dragged from a ListView.
An object that contains information about the event.
Raised when an dragged item enters the bounds of the ListView control.
An object that contains information about the event. The detail property of this object contains the following sub-properties: detail.dataTransfer.
Raised when a draggable item leaves the bounds of a ListView control.
An object that contains information about the event.
Raised when the user begins to drag an item from a ListView control.
An object that contains information about the event. The detail property of this object contains the following sub-properties: detail.dataTransfer, detail.dragInfo.
Occurs when the user taps or clicks an item.
An object that contains information about the event. The detail property of this object contains the following sub-properties: detail.itemIndex.
Raised when the focused item changes.
An object that contains information about the event. The detail property of this object contains the following sub-properties: detail.oldFocus, detail.oldNewFocus.
Occurs when the ListView control's loadingState changes.
An object that contains information about the event. The detail property of this object contains the following sub-properties: detail.scrolling.
Occurs after the current selection changes.
An object that contains information about the event. The detail property of this object is null. To obtain the selected items, use the ListView.selection property.
Occurs just before the current selection changes.
An object that contains information about the event. The detail property of this object contains the following sub-properties: detail.newSelection, detail.preventTapBehavior.
Repositions all the visible items in the ListView to adjust for items whose sizes have changed. Most apps won’t ever need to call this method. For more info, see the Remarks section.
Removes an event handler that the addEventListener method registered.
The name of the event that the event handler is registered for.
The event handler function to remove.
Set to true to remove the capturing phase event handler; set to false to remove the bubbling phase event handler.
Triggers the ListView disposal service manually.