共用方式為


ItemContainer.selected property

Gets or sets a value that specifies whether the item is selected.

Syntax

<div 
    data-win-control="WinJS.UI.ItemContainer" 
    data-win-options="{ selected : value}" >
</div>
var selected = itemContainer.selected;
itemContainer.selected = selected;

Property value

Type: Boolean

true if the item is selected; otherwise, false.

Requirements

Minimum WinJS version

WinJS 3.0

Namespace

WinJS.UI

See also

ItemContainer