私が取り組んでいることを示すために、次の XAML ソースがあります。
グループを垂直方向にサイズ変更するときは、最初のグループボックスを最大の高さまで拡張し、それに達したら、3 番目のグループボックスを拡張します。3 番目のグループボックスには最小の高さのプロパティもあります。
<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" x:Name="Screen_1_Name"
x:Class="TestExpansionScreens.Screen_1"
Width="400" Height="400">
<Grid x:Name="LayoutRoot" Background="White" Margin="0,0,0,0">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<GroupBox Header="Thing1" Background="LightGreen" Grid.Row="0" Grid.Column="0" MaxHeight="350">
<Button Content="Stuff1" />
</GroupBox>
<GroupBox Header="Thing2" Background="LightBlue" Grid.Row="1" Grid.Column="0">
<TextBox Text="Stuff2" Height="60" />
</GroupBox>
<GroupBox Header="Thing3" Background="Pink" Grid.Row="2" Grid.Column="0">
<TextBox Text="Stuff3" />
</GroupBox>
</Grid>
</UserControl>
通常、使用可能なスペースを埋めるために 1 つのコントロールを展開するだけの場合は、DockPanel を使用します。あらゆる種類のグリッドとドックパネルを組み合わせてこの例を作成しましたが、それを機能させる方法を解決できませんでした。それを実現する方法について何か考えはありますか?
ありがとう