ItemsControl with horizontal orientation

user101375 picture user101375 · Jun 27, 2009 · Viewed 73.6k times · Source

Do you know any controls inherited from the ItemsControl that have horizontal orientation of items?

Answer

Kent Boogaart picture Kent Boogaart · Jun 27, 2009

Simply change the panel used to host the items:

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