【发布时间】:2015-04-16 22:52:14
【问题描述】:
我在滚动列表视图控件时遇到了一个小问题。
当列表视图上的列表到达设备的底部边缘时,我正在尝试打开滚动选项。现在列表视图出现在我的应用程序的弹出控件上,我尝试了将列表视图的高度绑定到主页网格等设置,但没有成功。
这是屏幕截图的链接。底部的列表其实就是listview控件。
这是在弹出控件上具有列表视图和其他控件的 XAML:
<Popup x:Name="setShiftPopup" Width="350" Height="Auto">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Border x:Name="borderMainPopup" Grid.Row="0" Grid.RowSpan="5" Background="#FFE4E4E4" CornerRadius="15" BorderThickness="2"/>
<Border Grid.Row="0" Background="#FF0B6CF8" BorderThickness="2" Margin="0,0,-2,0" CornerRadius="10"/>
<StackPanel x:Name="Header" Grid.Row="0">
<TextBlock x:Name="tbSelectedDatePopup" Grid.Row="0" Margin="21,10,0,0" TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Top" FontSize="20" Foreground="#FFF7F0EF"/>
</StackPanel>
<StackPanel x:Name="SliderOne" Grid.Row="1" Orientation="Vertical">
<Slider x:Name="sliderShiftStartPopup" ValueChanged="sliderShiftStartEndPopup_ValueChanged" Margin="48,26,44,9.5" Maximum="48" LargeChange="0" SmallChange="0" Style="{StaticResource SliderShiftStartStyle}" FontFamily="Global User Interface"/>
</StackPanel>
<StackPanel x:Name="SliderTwo" Grid.Row="2">
<Slider x:Name="sliderShiftEndPopup" ValueChanged="sliderShiftStartEndPopup_ValueChanged" Grid.Row="1" Margin="48,13.5,44,80.333" Maximum="48" LargeChange="0" SmallChange="0" Style="{StaticResource SliderShiftEndStyle}" FontFamily="Global User Interface" Value="48"/>
</StackPanel>
<StackPanel x:Name="Favbutton" Grid.Row="3">
<Button x:Name="btnAddToFas" Click="btnAddToFas_Click" Grid.Column="0" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" Style="{StaticResource btnOnPopup}"/>
</StackPanel>
<StackPanel x:Name="ListView" Grid.Row="4">
<ListView x:Name="lvFASList" ItemsSource="{Binding theFasListOC}" Foreground="Red" FontSize="40" Grid.Row="1" ShowsScrollingPlaceholders="False">
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock x:Name="theShift" Text="{Binding theShift}" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="17"/>
<Button x:Name="btnDeleteShift" Click="btnDeleteShift_Click" Content="X" HorizontalAlignment="Center" VerticalAlignment="Center" Width="Auto" Height="Auto" FontFamily="Global User Interface"/>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackPanel>
</Grid>
</Popup>
请指教!
【问题讨论】: