Xaml 当ListView HorizontalAlignment=拉伸时,它不再滚动?
我正在开发一个WP WinRT应用程序,其中包含一个带有ListView的页面,如果其内容(绑定)比屏幕长,则需要滚动该页面。现在,我希望这个应用程序可以跨不同的屏幕大小进行扩展,但现在scrollviewer只是从页面的底部跌落,而不会捕捉到屏幕的底部 XAML:Xaml 当ListView HorizontalAlignment=拉伸时,它不再滚动?,xaml,listview,windows-runtime,windows-phone-8.1,Xaml,Listview,Windows Runtime,Windows Phone 8.1,我正在开发一个WP WinRT应用程序,其中包含一个带有ListView的页面,如果其内容(绑定)比屏幕长,则需要滚动该页面。现在,我希望这个应用程序可以跨不同的屏幕大小进行扩展,但现在scrollviewer只是从页面的底部跌落,而不会捕捉到屏幕的底部 XAML: 我无法重现你的问题。您提供的ListView可以很好地滚动,并占用所有剩余的垂直空间。你能澄清一下你的问题吗?你说的“scrollviewer只是从页面上掉下来”(它不会)和“不会捕捉到屏幕底部”(它会)是什么意思。Vertica
我无法重现你的问题。您提供的ListView可以很好地滚动,并占用所有剩余的垂直空间。你能澄清一下你的问题吗?你说的“scrollviewer只是从页面上掉下来”(它不会)和“不会捕捉到屏幕底部”(它会)是什么意思。VerticalScrollViewVisibility=Visible就是其中的关键。
<Grid x:Name="LayoutRoot">
<Grid.ChildrenTransitions>
<TransitionCollection>
<EntranceThemeTransition FromHorizontalOffset="100"/>
</TransitionCollection>
</Grid.ChildrenTransitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- Title Panel -->
<StackPanel Grid.Row="0" Margin="19,0,0,0">
<TextBlock Text="TITLE" Style="{ThemeResource TitleTextBlockStyle}" Margin="0,12,-0.167,0">
<TextBlock.Foreground>
<SolidColorBrush Color="{StaticResource LightForegroundColor}"/>
</TextBlock.Foreground>
</TextBlock>
<TextBlock Text="subtitle Margin="0,-6.5,0,26.5" Style="{ThemeResource HeaderTextBlockStyle}" CharacterSpacing="{ThemeResource PivotHeaderItemCharacterSpacing}" FontSize="48">
<TextBlock.Foreground>
<SolidColorBrush Color="White"/>
</TextBlock.Foreground>
</TextBlock>
<TextBlock Margin="0,0,18.833,0" TextWrapping="Wrap" Text="This is a textblock with some random text." VerticalAlignment="Top" FontSize="14.667" Style="{StaticResource BaseTextBlockStyle}">
<TextBlock.Foreground>
<SolidColorBrush Color="{StaticResource DarkForegroundColor}"/>
</TextBlock.Foreground>
</TextBlock>
</StackPanel>
<ListView Grid.Row="1" Margin="0,10,0,0">
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel Margin="0,11,0,0">
<TextBlock Style="{ThemeResource ListViewItemTextBlockStyle}" Text="Text"/>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>