저는 SL 4 앱을 만들고 있습니다. UI는 세 가지 주요 부분으로 구성됩니다 : 상단 검색 막대, 하단 즐겨 찾기 막대 및 둘 사이의 페이지 내용. 페이지 내용이 사용 가능한 모든 공간을 차지하고 싶습니다. 지금은 수평으로 확장되지만 수직으로는 확장되지 않습니다. 내가 뭘 잘못하고 있는지 모르겠다. 다음은 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 열이 자동으로 표시되어 내용에 필요한 최소값을 의미합니다. – Stephan
흥미 롭습니다. 가운데에 대해 Height = "*"'를 지정하는 것은 다른 두 개에 대해 Height = "Auto"를 더한 것과 같을 것이라고 생각했습니다. –