tags:

views:

138

answers:

2

I'm looking for some layout panel for WPF which "stacks" its children horizontally, but fits them all into the panel, i.e. not like StackPanel which just keeps on adding them with their full width.

So for example, this magical panel is 1000 points wide. I add a child element to it, which gets the full 1000 point width. I add another one and the two children get 500 points each. I add yet another one and the three children now get 333.33333... point width. Et cetera.

+2  A: 
<UniformGrid Rows="1" />

Should do the trick.

Bryan Anderson
A: 

you can use UniformGrid, settings it's property - Rows to 1. This panel arranges childs in cell's of equal sizes.

Yurec