WPF之UI布局(二)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
开发工具与关键技术:Visual Studio 2015、WPF
作者: 梁柏源
撰写时间:2020/12/18
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
继上次介绍了Wpf的UI布局里四大布局:Grid(网格)、DockPanel(泊靠面板)、StackPanel(栈式面板)以及WrapPanel(自动拆行面板)(环绕面板)。其中数Grid(网格)、DockPanel(泊靠面板)。这次就简单的实践一下:
<DockPanel Margin="5" LastChildFill="True">
<Grid DockPanel.Dock="Top" Height="40">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="7*"/>
<ColumnDefinition Width="1.5*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="基本信息" Foreground="White" FontFamily="楷体" FontSize="28" FontWeight="Bold" HorizontalAlignment="Center"</