我有一个在多个地方使用的 ListView 模板,我想动态更改布局类型:
<div class="sorteditemslist" arial-label="sorted items"
data-win-control="WinJS.UI.ListView"
data-win-options="{layout: { type: WinJS.UI.ListLayout}}"
data-win-bind="winControl.itemDataSource: items.dataSource; winControl.iteminvoked: ItemInvoked;">
默认布局类型是WinJS.UI.GridLayout
,但在某些情况下,我想将其更改为ListLayout
.