Frage

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?

War es hilfreich?

Lösung

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" >
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top