ListBox With Items Panel

image_pdfimage_print


   
      
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <ListBox HorizontalAlignment="Center" VerticalAlignment="Center">

        <ListBox.ItemsPanel>
            <ItemsPanelTemplate>
                <UniformGrid />
            </ItemsPanelTemplate>
        </ListBox.ItemsPanel>

        <ListBoxItem>Whatever Item 1</ListBoxItem>
        <ListBoxItem>Whatever Item 2</ListBoxItem>
        <ListBoxItem>Whatever Item 3</ListBoxItem>
        <ListBoxItem>Whatever Item 4</ListBoxItem>
        <ListBoxItem>Whatever Item 5</ListBoxItem>
        <ListBoxItem>Whatever Item 6</ListBoxItem>
        <ListBoxItem>Whatever Item 7</ListBoxItem>
        <ListBoxItem>Whatever Item 8</ListBoxItem>
        <ListBoxItem>Whatever Item 9</ListBoxItem>

    </ListBox>
</Page>