在搜索有关ScrollView不显示的帖子后,我找不到与我的类似的一个示例。ScrollView可见但不可滚动页面
请参阅下面的代码,我的ScrollView是可见的,但它不可滚动。我想知道我需要改变哪一部分才能使其工作?
<Page x:Class="Apps"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
Title="Apps"
VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Width="auto" Height="auto">
<ScrollViewer>
<StackPanel>
<Label Content="All applications stored on desktop computer" Height="28" Name="Label2" FontSize="16" FontWeight="Bold" HorizontalContentAlignment="Center" Margin="5" />
<Grid Margin ="10" HorizontalAlignment="Left" Name="gridApps" VerticalAlignment="Top" Width="auto">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150"/>
<ColumnDefinition Width="150" />
<ColumnDefinition Width="150" />
<ColumnDefinition Width="150" />
<ColumnDefinition Width="150" />
<ColumnDefinition Width="150" />
<ColumnDefinition Width="150" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
</Grid>
</StackPanel>
</ScrollViewer>
</Page>
哪里是你的网格内的内容?如果您在RowDefintion上放置固定高度,会发生什么情况? –