C# WrapGrid和许多图像
我有GridView,WrapGrid作为ItemTemplate。它看起来像:C# WrapGrid和许多图像,c#,windows-runtime,winrt-xaml,C#,Windows Runtime,Winrt Xaml,我有GridView,WrapGrid作为ItemTemplate。它看起来像: <GridView ItemsSource={Binding MyItemSource}> <GridView.ItemTemplate> <DataTemplate> <Image Width="250" Height="250"> <Image.Source>
<GridView ItemsSource={Binding MyItemSource}>
<GridView.ItemTemplate>
<DataTemplate>
<Image Width="250" Height="250">
<Image.Source>
<BitmapImage UriSource="{Binding }" DecodePixelWidth=250/>
</Image.Source>
</Image>
</DataTemplate>
</GridView.ItemTemplate>
<GridView.ItemsPanel>
<ItemsPanelTemplate>
<WrapGrid/>
</ItemsPanelTemplate>
</GridView.ItemsPanel>
</GridView>
MyItemSource包含图像文件的Uri(很多Uri)。得益于虚拟化过程,它可以在没有OutOfMemoryException的情况下工作。然而,当我决定滚动“快且远”时,滚动区域中“介于”之间的图像会有很多不必要的加载工作。(大量不必要的cpu、磁盘和内存使用)我希望在用户不滚动时开始加载过程(当用户停止滚动时,不加载滚动时只会看到片刻的图像)。有可能吗?如果您使用的是Windows 8.1,则可以点击ContainerContentChanged事件并控制在何时渲染的内容