Reputation: 2585
I'm using a wrap panel to show several user controls. All of the user controls have a different height and width.
I'd like to arrange the items as maximum 2 items by row, I mean:
| Item1 | Item2 |
| Item3 | Item4 |
| Item5 | Item5 |
I say this becase, when the user expand the window, the items allocate in another positions and it looks like a mess.
Upvotes: 0
Views: 301
Reputation: 84657
Use the UniformGrid
it's made for this very purpose
<UniformGrid Columns="2">
<!-- Your Controls.. -->
</UniformGrid>
Upvotes: 4
Reputation: 16949
Put the WrapPanel in a ListBox, http://msmvps.com/blogs/theproblemsolver/archive/2008/11/18/some-more-fun-with-a-silverlight-listbox.aspx, and then have a MaxWidth.
Upvotes: 0