WPF-ComplexLayout

DockPanel
WPF-ComplexLayout

    <TextBlock Background="LightBlue"
            DockPanel.Dock="Top">Some Text</TextBlock>
    <TextBlock DockPanel.Dock="Bottom"
            Background="LightYellow">Some text at the bottom of the page.</TextBlock>
    <TextBlock DockPanel.Dock="Left"
            Background="Lavender">Some More Text</TextBlock>
    <DockPanel Background="Bisque">
        <StackPanel DockPanel.Dock="Top">
            <Button HorizontalAlignment="Left" 
            Height="30px"
            Width="100px"
            Margin="10,10,10,10">Button1</Button>
            <Button HorizontalAlignment="Left"
            Height="30px"
            Width="100px"
            Margin="10,10,10,10">Button2</Button>
        </StackPanel>
        <TextBlock Background="LightGreen">Some Text Below the Buttons</TextBlock>
    </DockPanel>
</DockPanel>
上一篇:WPF-ComplexLayout


下一篇:ROS机器人程序设计(原书第2版)1.1 PC安装教程