-1

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.

theSimbox
  • 21
  • 1
  • Please provide a code example of what you're trying to do and we can build it from there. Check the documentation of WrapPanel and try to come up with a solution we can work upon. – santamanno Apr 17 '21 at 21:37

1 Answers1

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>

After Resizing Before Resizing