Reputation: 9684
What sort of control can layout child items horizontally and also uniformly resize the items to fit the available horizontal space? I'm replacing the "ItemsPanelTemplate" within a treeview template and a stackpanel will lay the items out in the correct orientation, but not resize them. A grid will only show the first child item in the treeview and lacks the support for reoriented horizontally.
Upvotes: 3
Views: 2109
Reputation: 11601
You can use a uniformgrid in conjunction with a viewbox:
For example
<ViewBox StretchMode= "UniformToFill">
<UniformGrid Cols="5">
</UniformGrid>
</ViewBox>
Please pay attention to the different values of the StretchMode of the ViewBox, and also the number of element in a row of the uniform grid. They depend on your data and how you want to arrange elements.
Upvotes: 0