WPF控件学习系列之四---WrapPanel控件

Wrap Panel

 

Introduction介绍

The wrap panel is similar to the StackPanel but it does not just stack all child elements to one row, it wraps them to new lines if no space is left. The Orientation can be set to Horizontal or Vertical.

The WrapPanel can be used to arrange tabs of a tab control, menu items in a toolbar or items in an Windows

Explorer like list. The WrapPanel is often used with items of the same size, but its not a requirement.

 

WPF中的WrapPanel控件类似于StackPanel,但它不仅仅是对子元素停靠在一列上,如果列上的空间不足时,它还将元素进行换行处理。

可通过Orientation属性设置垂直停靠或水平停靠。

WrapPanel控件可用于排列选项卡型标签、工具栏中的菜单项或像Windows资源管理器列表项目。WrapPanel经常用到排列相同标尺的项目,但也不是必须相同的。

 
<WrapPanel Orientation="Horizontal">
    <Button Content="Button" />
    <Button Content="Button" />
    <Button Content="Button" />
    <Button Content="Button" />
    <Button Content="Button" />
</WrapPanel>
 
2011-04-16
译者:gavinlove_
原文出处:http://www.wpftutorial.net/WrapPanel.html
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值