4 개의 확장자 컨트롤을 4 개의 행이있는 Grid 안에 넣으려고하면 확장기 컨트롤에 Grid 및 ListBox (현재 일부 샘플 데이터 보유)가 포함되어 있습니다.Silverlight - ListBox가있는 확장기 컨트롤, 100 % 높이
이상적으로 확장기가 확장되면 나머지 확장기를 화면에서 벗어나지 않고 목록 상자 밖으로 밀어 내지 않고 사용 가능한 공간을 모두 채우고 싶습니다. 누구든지 아래의 XAML을 적용하거나이를 달성하기 위해 XAML을 업데이트하는 방법을 생각해 낼 수 있습니까?
<Grid x:Name="LayoutRoot" Background="White" DataContext="{Binding Source={StaticResource ExpanderData}}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.246*"/>
<RowDefinition Height="0.754*"/>
</Grid.RowDefinitions>
<Grid Margin="0" Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.275*"/>
<ColumnDefinition Width="0.725*"/>
</Grid.ColumnDefinitions>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<toolkit:Expander x:Name="Expander1" Header="One" IsExpanded="False">
<Grid Background="#FFE5E5E5">
<ListBox Margin="0" ItemTemplate="{StaticResource ItemTemplate}" ItemsSource="{Binding Collection}"/>
</Grid>
</toolkit:Expander>
<toolkit:Expander x:Name="Expander2" Header="Two" IsExpanded="True" VerticalAlignment="Top" Grid.Row="1">
<Grid Background="#FFE5E5E5">
<ListBox Margin="0" ItemTemplate="{StaticResource ItemTemplate1}" ItemsSource="{Binding Collection}"/>
</Grid>
</toolkit:Expander>
<toolkit:Expander x:Name="Expander3" Header="Three" VerticalAlignment="Top" Grid.Row="2" IsExpanded="False">
<Grid Background="#FFE5E5E5">
<ListBox Margin="0" ItemTemplate="{StaticResource ItemTemplate2}" ItemsSource="{Binding Collection}"/>
</Grid>
</toolkit:Expander>
<toolkit:Expander x:Name="Expander4" Header="Four" VerticalAlignment="Top" Grid.Row="3" IsExpanded="False">
<Grid Background="#FFE5E5E5">
<ListBox Margin="0" ItemTemplate="{StaticResource ItemTemplate3}" ItemsSource="{Binding Collection}"/>
</Grid>
</toolkit:Expander>
</Grid>
</Grid>
</Grid>
</Grid>
</UserControl>
@CLiown, DockPanel이 도움이 되었습니까? –