WPF-组合使用Panel

组合使用Panel代码可到达如下效果

<Window x:Class="combination.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="283">
    <DockPanel>
        <StackPanel Orientation="Horizontal" DockPanel.Dock="Bottom" HorizontalAlignment="Right">
            <Button Content="Button" Margin="10,10,5,10" Padding="2"/>
            <Button Content="Button" Margin="5,10,10,10"/>
        </StackPanel>
        <TextBox TextWrapping="Wrap" Text="TextBox" DockPanel.Dock="Top"/>
    </DockPanel>
</Window>

这里写图片描述

猜你喜欢

转载自blog.csdn.net/maybe_ch/article/details/80589922