次のコードは、2 番目のテキスト要素が「下」とマークされていても、2 つのテキスト要素を上に配置します。背景色が一番下まで伸びているため、DockPanel が一番下まで伸びているように見えます。
DockPanel について理解していないことは何ですか?
<Window x:Class="TestIndexer934.Views.MainView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:c="clr-namespace:TestIndexer934.Commands"
Title="Main Window" Height="400" Width="800">
<DockPanel HorizontalAlignment="Left" Background="Beige">
<TextBlock DockPanel.Dock="Top" Text="Testing top"/>
<TextBlock DockPanel.Dock="Bottom" Text="Testing bottom"/>
</DockPanel>
</Window>