상태 표시 줄에 TextBlock과 몇 개의 버튼이 있습니다. 버튼은 실제로 오른쪽 정렬됩니다 (e : 실제로 이들을 포함하는 StatusBarItem이 있습니다). 창이 가로로 축소되어 텍스트가 줄 바꿈되면 TextBlock은 창에서 Buttons를 다양한 각도로 푸시합니다.TextBlock 텍스트 배치가 다른 구성 요소를 푸시합니다.
왜 이런 일이 발생하며 버튼의 위치를 수정하려면 어떻게해야합니까?
<Window x:Class="TextWrapping.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<DockPanel>
<StatusBar DockPanel.Dock="Bottom">
<StatusBarItem>
<TextBlock Name="statusText" TextWrapping="Wrap" Text="when this text wraps, it pushes the buttons off the window" />
</StatusBarItem>
<StatusBarItem HorizontalAlignment="Right">
<StackPanel Orientation="Horizontal">
<Button>one</Button>
<Button>two</Button>
</StackPanel>
</StatusBarItem>
</StatusBar>
<TextBlock Text="shink this window horizontally" />
</DockPanel>
</Window>