Live Chat Icon For mobile
Live Chat Icon

How do I display items in a ListBox horizontally?

Platform: WPF| Category: ListBox

Items can be displayed horizontally using the ItemsPanel property of the ListBox.

The following lines of code are used to display the items horizontally.


<ListBox Height='40' Width='50'>
            	<StackPanel Orientation='Horizontal'/>
      <ListBoxItem>1 ITEM 1</ListBoxItem>
<ListBoxItem>2 ITEM 2</ListBoxItem>
<ListBoxItem>3 ITEM 3</ListBoxItem>

Share with