以下に示す XAML があります (例)。グリッドスプリッターを左にドラッグし、マウスをドラッグし続けると、右側の列のサイズがウィンドウの境界の外に大きくなります-明らかに私が望むものではありません.
問題は、ユーザーがウィンドウのサイズを変更できるため、右側の列にハード MaxWidth を設定できないため、その列の使用可能なスペースが増えることです。これまでのところ、右側の列の MaxWidth を、ウィンドウのクライアント領域から左側の MinWidth とスプリッタ列の幅を引いたものにバインドする必要があると思います。でも、できれば避けたいですよね。考え?
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="450"
Height="300">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" MinWidth="100" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="200" MinWidth="200" />
</Grid.ColumnDefinitions>
<Grid Grid.Column="0">
<Button>Monkey</Button>
</Grid>
<GridSplitter Grid.Column="1" Width="7" ResizeBehavior="PreviousAndNext" />
<Grid Grid.Column="2" Margin="4">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<GroupBox Grid.Row="0" Header="Spaghetti" Margin="0, 0, 0, 5">
<ComboBox HorizontalAlignment="Stretch" VerticalAlignment="Stretch">Noodles</ComboBox>
</GroupBox>
<Expander Grid.Row="1" Header="Batman" IsExpanded="True" Margin="0, 0, 0, 5">
<Button HorizontalAlignment="Stretch" VerticalAlignment="Stretch">Batman!</Button>
</Expander>
</Grid>
</Grid>
</Window>