WPF でシンプルなメニューバーを実現しようとしています。
XAML は次のとおりです。
<Page
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<DockPanel>
<DockPanel Background="Black" VerticalAlignment="Top" LastChildFill="True" DockPanel.Dock="Top" Height="28">
<ToggleButton Content="--" Visibility="Collapsed" />
<StackPanel Orientation="Horizontal">
<Button Content="Add" />
<Button Content="Expand" />
</StackPanel>
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
<TextBox Text="Search" MinWidth="80" Width="200" />
<Button Content="X" Margin="0,1,50,0" />
</StackPanel>
</DockPanel>
</DockPanel>
</Page>
見栄えは良いのですが、ページの幅を小さくすると、最後の子 (検索テキスト ボックスのある Stackpanel) が左のアイテムの後ろに隠れてしまいます。このように: http://s9.postimage.org/m0tkrobwd/printscreen.png
MinWidth を達成するのに十分なスペースがある場合、テキストボックスのサイズが変更されるとよいでしょう...それは可能ですか?