Panel which stacks child elements horizontally, fitting them into the available size
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... p开发者_开发知识库oint width. Et cetera.
<UniformGrid Rows="1" />
Should do the trick.
you can use UniformGrid, settings it's property - Rows to 1. This panel arranges childs in cell's of equal sizes.
精彩评论