WPF 布局WrapPanel使用案例
一、WrapPanel
自动换行布局
<Window x:Class="WpfAppNet8.Panel.WrapPanel1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:WpfAppNet8.Panel" mc:Ignorable="d" Title="WrapPanel1" Height="450" Width="800"> <WrapPanel> <Button Content="测试001" Width="100" Height="100"></Button> <Button Content="测试001" Width="200" Height="100"></Button> <Button Content="测试001" Width="100" Height="100"></Button> <Button Content="测试001" Width="200" Height="100"></Button> <Button Content="测试001" Width="100" Height="100"></Button> <Button Content="测试001" Width="200" Height="100"></Button> <Button Content="测试001" Width="100" Height="100"></Button> </WrapPanel> </Window>
展示结果:


更多:
浙公网安备 33010602011771号