これらのドックパネルを正しく取得するには?
<DockPanel Grid.Row="1" LastChildFill="True" HorizontalAlignment="Stretch">
<DockPanel Width="400" LastChildFill="False" HorizontalAlignment="Left">
<DockPanel>
<TextBlock Width="400" />
</DockPanel>
<DockPanel Height="35" DockPanel.Dock="Bottom" LastChildFill="False">
<Button x:Name="btnRefresh" Content="Refersh" />
</DockPanel>
</DockPanel>
TextBlock を持つ DockPanel は、下部にドッキングされている DockPanel にまたがっています。私はそれをぴったり合わせたいと思っています。何か案は?
わかりました。下部にドッキングされたパネルは、xaml 宣言でその上にあるドックパネルより前にある必要があります。LastChildFill="True" は、コードで最後に宣言されたコントロールに適用されます。
<DockPanel Grid.Row="1" LastChildFill="True" HorizontalAlignment="Stretch">
<DockPanel Width="400" LastChildFill="False" HorizontalAlignment="Left">
<DockPanel Height="35" DockPanel.Dock="Bottom" LastChildFill="False">
<Button x:Name="btnRefresh" Content="Refersh" />
</DockPanel>
<DockPanel>
<TextBlock Width="400" />
</DockPanel>
</DockPanel>