如何让Hub填充其余空间?不少也不多。如果Listview较长,则Hub会在屏幕下方结束。
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<controls:PageHeader Content="Main Page">
<controls:PageHeader.SecondaryCommands>
…
</controls:PageHeader.SecondaryCommands>
</controls:PageHeader>
<Hub>
<HubSection>
<DataTemplate>
<ListView>
…
</ListView>
</DataTemplate>
</HubSection>
<HubSection>
…
<HubSection>
</Hub>
</Grid>
答案 0 :(得分:0)
试试这个:
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Grid.Row="0">
<controls:PageHeader Content="Main Page">
<controls:PageHeader.SecondaryCommands>
…
</controls:PageHeader.SecondaryCommands>
</controls:PageHeader>
</StackPanel>
<Grid Grid.Row="1">
<Hub>
<HubSection>
<DataTemplate>
<ListView>
…
</ListView>
</DataTemplate>
</HubSection>
<HubSection>
…
<HubSection>
</Hub>
</Grid>
</Grid>