私はSL 4アプリを構築しています。 UIは、3つの主要な部分で構成されています。上部の検索バー、下部のお気に入りバー、および2つの間のページコンテンツです。私は、ページのコンテンツがすべての利用可能な領域を占めるようにしたいと思います。今は、水平に拡張されますが、垂直には拡張されません。私は何が間違っているのか分かりません。ここにXAMLがあります:Silverlight:このコントロールをすべての空き領域を占有させるにはどうすればよいですか?
<Grid x:Name="LayoutRoot" Background="BurlyWood">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<my:TopSearchBar x:Name="topSearchBar" Grid.Row="0" Navigator="{Binding ElementName=navigationFrame}" HorizontalAlignment="Stretch" VerticalAlignment="Top" />
<!-- I want this to take up all available space between the bottom and top elements -->
<navigation:Frame x:Name="navigationFrame" Source="/HomePage.xaml" Grid.Row="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="BlueViolet" />
<my:BottomFavoritesBar x:Name="bottomFavoritesBar" Grid.Row="2" Navigator="{Binding ElementName=navigationFrame}" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" />
</Grid>
私は間違って何ができますか?
'Height =" Auto "は暗黙的ではありませんか? –
自動は暗黙的ですが、重要な部分は「*」列です。それは利用可能なすべてのスペースを占めるように指示します。それがなければ、3つの列はすべてAutoになります。これは内容に必要な最小値を意味します。 – Stephan
興味深い。私は、Height = "*" 'を中部に指定することは、他の2つについては、Height =" Auto "を指定することと同じであると考えました。 –