![](/img/trans.png)
[英]Using Monocross on Windows Phone 7 with Panorama and/or Pivot control
[英]Windows Phone 8 Pivot control virtualization
我正在嘗試制作一個圖像滾動應用程序,該應用程序可以在滑動時滾動圖像,問題是我的應用程序啟動時我的所有圖像都立即加載到了內存中。 誰能說出如何實施虛擬化?
C#:
public ObservableCollection<im> imagelist { get; set; }
public ImageGalaryUc()
{
InitializeComponent();
imagelist = new ObservableCollection<im>();
this.DataContext = this;
// ImageStack.ItemsSource = new VirtualSongList();
this.Loaded += ImageGalaryUc_Loaded;
}
XAML:
<Controls:Pivot x:Name="ImageStack" ItemsSource="{Binding imagelist}" >
<Controls:Pivot.ItemTemplate>
<DataTemplate>
<Grid>
<Image Source="{Binding bimage}" />
</Grid>
</DataTemplate>
</Controls:Pivot.ItemTemplate>
</Controls:Pivot>
看看這個樣本http://code.msdn.microsoft.com/wpapps/Basic-Lens-sample-359fda1b
它包含一個稱為媒體查看器的組件-實現非常相似的行為和虛擬化。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.