0
在我的uwp應用程序中,我有一個ListView
,但它是固定高度,不可滾動>我知道在stackoverflow上有很多類似的問題,但他們都沒有幫助我。 這裏是我的代碼:ListView中沒有滾動UWP
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<TextBlock Text="{x:Bind Reply.heading}"
FontSize="20"
Grid.Row="0"
Margin="10"/>
<ListView ItemsSource="{x:Bind Reply.faq, Mode=OneWay}"
SelectionMode="None"
IsHitTestVisible="False"
Grid.Row="1">
<ListView.ItemTemplate>
<DataTemplate x:DataType="models:FaqItem">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<TextBlock Text="{x:Bind question, Mode=OneWay}"
FontWeight="SemiBold"
TextWrapping="WrapWholeWords"
FontSize="18"/>
<TextBlock Text="{x:Bind answer, Mode=OneWay}"
Grid.Row="1"
FontSize="16"
TextWrapping="WrapWholeWords"
Margin="0, 0, 0, 20"/>
</Grid>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
刪除這個'IsHitTestVisible =「False」'。 –