WrapPanel

时间:2015-12-28 15:28:17   收藏:0   阅读:166

WrapPanel将子元素自左向右逐个地排列, 若一个水平行中放不下,就排在下一行。面板的方向可以是水平或垂直的

<Window x:Class="Panel布局.WrapPanelxaml"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="WrapPanelxaml" Height="300" Width="367">
    <WrapPanel>
        <Button Width="100" Height="30" Margin="5">ButtonA</Button>
        <Button Width="100" Height="30" Margin="5">ButtonB</Button>
        <Button Width="100" Height="30" Margin="5">ButtonC</Button>
        <Button Width="100" Height="30" Margin="5">ButtonD</Button>
        <Button Width="100" Height="30" Margin="5">ButtonE</Button>
        <Button Width="100" Height="30" Margin="5">ButtonF</Button>
        <Button Width="100" Height="30" Margin="5">ButtonG</Button>
        <Button Width="100" Height="30" Margin="5">Buttonh</Button>
    </WrapPanel>
</Window>

技术分享

原文:http://www.cnblogs.com/hdsong/p/5076306.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!