个人技术分享

WrapPanel: 换行panel 子元素进行换行,当子元素的宽度或者高度超出了父元素,才进行换行。高度超出父元素的高度 也会另起一列

属性

Orientation 布局方式

实例

<WrapPanel Orientation="Horizontal">
    <Label>
        C# 是从 C/C++ 衍生出来的,它在继承 C/C++强大功能的同时,抛弃了 C/C++ 的一些复杂特性。C# 还和 Java 非常类似
    </Label>
    <Label>
        C# 是从 C/C+
    </Label>
    <StackPanel Width="300"
                Height="100"
                Background="Red"> 
    </StackPanel>
    <StackPanel Width="300"
                Height="100"
                Background="Blue">
    </StackPanel>
</WrapPanel>

效果: