I've an ItemsControl
with the following code:
<ItemsControl ItemsSource="{Binding SomeModelList}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Vertical" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<controls:SomeUserControl ModelValue="{Binding}"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
But visually, I've only one column of items, and some items are not displayed(overflow on the bottom of the windows). What should I do to get those in two column when not space available?
Edit
in fact, if I set a "MaxWidth", I get two column, but this is still not working as expected, because if I've not a lot of items, they should be on one column and use the available space
Edit 2
Some more informations: My container(the one with the ItemsControl) is a window, that contains a Grid. One of the cell is allocated to this ItemsControl. It is set to use all the remaining space.
The userControl are composed with one DockPanel, which contains some textBlock and a graphic. Even if there is no Height specified, this control cannot grow in height, but in width.