I want to build a WrapPanel with some elements, e.g. labels, and I while they are all beneath on another, I want the to fill the entire horizontal space. As far as I can tell, the WrapPanel fills the space itself, but the elements themselves don't. Does anyone have an idea/ solution how I could achieve this? It should look this way.
Asked
Active
Viewed 269 times
1 Answers
0
use this Code And Replace your Elements with Labels.
<WrapPanel Orientation="Vertical">
<Label Background="Blue" Content="Toggle" FontWeight="Bold"/>
<Label Background="Red" Content="Toggle" FontWeight="Bold"/>
<Label Background="Brown" Content="Toggle" FontWeight="Bold"/>
<Label Background="WhiteSmoke" Content="Toggle" FontWeight="Bold"/>
<Label Background="Yellow" Content="Toggle" FontWeight="Bold"/>
</WrapPanel>