sekar
sekar

Reputation:

Silverlight 3 List box

How to set the orientation of the List box in Silverlight i.e how to display the data horizontally?

Upvotes: 1

Views: 539

Answers (1)

James Cadd
James Cadd

Reputation: 12216

Modify the ItemsPanel of the ListBox and set it to a StackPanel that's oriented Horizontally:

<ListBox>
    <ListBox.ItemsPanel>
        <ItemsPanelTemplate>
            <StackPanel Orientation="Horizontal"/>
        </ItemsPanelTemplate>
    </ListBox.ItemsPanel>
</ListBox>

Upvotes: 4

Related Questions