Friday 18 July 2014

WPF WrapPanel Layout Control



Wrap Panel
WrapPanel positions child elements in sequential position from left to right or top to bottom. Default positioning is left to right.

<WrapPanel>
        <Button Margin="4" Width="100">First</Button>
        <Button Margin="4" Width="100">Second</Button>
        <Button Margin="4" Width="100">Third</Button>
        <Button Margin="4" Width="100">Fourth</Button>
        <Button Margin="4" Width="160">Fifth</Button>
        <Button Margin="4" Width="160">Sixth</Button>
        <Button Margin="4" Width="200">Seventh</Button>
</WrapPanel>
If you want to position child controls to top to bottom, set WarpPanel Property  Orientation="Vertical"


No comments:

Post a Comment