Ugrás a tartalomhoz

.NET Programming Technologies

Gergely Kovásznai, Csaba Biró

Eszterházy Károly College

WrapPanel

WrapPanel

It is suitable for displaying items alongside or next to each other. If an item does not fit on the line, it is automatically placed on the next one. The width and the height of the elements stored in this panel is optional.

Example IV.4 WrapPanel

IV.4. WrapPanel

<Grid Width="200" Height="200">

        <WrapPanel>

                <Ellipse Fill="Red" Height="40" Width="40"/>

                <Ellipse Fill="Red" Height="40" Width="40"/>

                <Ellipse Fill="Red" Height="40" Width="40"/>

                <Ellipse Fill="Red" Height="40" Width="40"/>

                <Ellipse Fill="Red" Height="40" Width="40"/>

                <Ellipse Fill="Red" Height="40" Width="40"/>

                <Ellipse Fill="Red" Height="40" Width="40"/>

        </WrapPanel>

</Grid>

If Vertical Orientation attribute is set, the stored items will be under each other.

<WrapPanel Orientation="Vertical">