简体   繁体   中英

ItemsPanel property in Longlistselector control Windows Phone 8 SDK

Does anybody know if the Longlistselector control from Windows Phone 8 SDK (not Windows Phone toolkit for WP 7.5) has the ItemsPanel property or an equivalent?

The ListBox control has such property, i use it for wrapping the items in a WrapPanel.

<ListBox>
    <ListBox.ItemsPanel>
        <ItemsPanelTemplate>
            <toolkit:WrapPanel/>
        </ItemsPanelTemplate>
    </ListBox.ItemsPanel>
</ListBox>

There is an answer here: How to wrap ItemsPanel in LongListSelector? but this refers to the Longlistselector found in the Toolkit NOT in the WP8 SDK (where i do not have access to source code to use the mentioned solution).

Does anybody have an idea?

You should be able to accomplish this with the LayoutMode property. Set the value to Grid

Gets or sets a value that specifies if the Microsoft.Phone.Controls.LongListSelector is in a list mode or grid mode from the Microsoft.Phone.Controls.LongListSelectorLayoutMode enum.

<phone:LongListSelector ItemsSource="{Binding Items}" LayoutMode="Grid" >

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM