Wpf: How do I place elements horizontally and evenly?

Which control can place children horizontally and evenly resize elements to fit the available horizontal space? I am replacing the “ItemsPanelTemplate” in the tree structure template, and the stack pane will place the elements in the correct orientation but not resize them. The grid will display only the first child in the tree structure and will not support horizontal reorientation.

+3
source share
2 answers

I think that <UniformGrid Rows="1"/>will only do what you want

+8
source

viewbox:

<ViewBox StretchMode= "UniformToFill">
    <UniformGrid Cols="5">

    </UniformGrid>

</ViewBox>

StretchMode ViewBox, . , .

0

Source: https://habr.com/ru/post/1768954/


All Articles