WPF-ImportantExample/_2DockPanel特性/MainWindow.xaml

17 lines
906 B
Plaintext
Raw Permalink Normal View History

2025-01-25 22:00:48 +08:00
<Window x:Class="_2DockPanel.MainWindow"
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"
mc:Ignorable="d"
Icon="public/logo.png" Title="_2DockPanel特性 P59" Height="450" Width="800">
<!-- 靠边停靠 -->
<DockPanel LastChildFill="True">
<Button DockPanel.Dock="Top">DockPanel.Dock="Top"</Button>
<Button DockPanel.Dock="Bottom">DockPanel.Dock="Bottom"</Button>
<Button DockPanel.Dock="Left">DockPanel.Dock="Left"</Button>
<Button DockPanel.Dock="Right">DockPanel.Dock="Right"</Button>
<!-- LastChildFill="True" 告诉Dock占满空间 -->
<Button>中間的</Button>
</DockPanel>
</Window>