我想显示存储在Windows Phone 8照片文件夹中的所有图像在我的自定义画廊,它使用ListBox来显示图像。 ListBox代码如下所示: <phone:PhoneApplicationPage.Resources> <MyApp:PreviewPictureConverter x:Key="PreviewPictureConverter" /> </phone:PhoneApplicationPage.Resources> <ListBox Name="previewImageListbox" VirtualizingStackPanel.VirtualizationMode="Recycling"> <ListBox.ItemsPanel> <ItemsPanelTemplate> <VirtualizingStackPanel CleanUpVirtualizedItemEvent="VirtualizingStackPanel_CleanUpVirtualizedItemEvent_1"> </VirtualizingStackPanel> </ItemsPanelTemplate> </ListBox.ItemsPanel> <ListBox.ItemTemplate> <DataTemplate> <Grid> <Image Source="{Binding Converter={StaticResource PreviewPictureConverter}}" HorizontalAlignment="Center" VerticalAlignment="Center" /> </Grid> </DataTemplate> </ListBox.ItemTemplate> </ListBox> 用下面的转换器: public class PreviewPictureConverter : System.Windows.Data.IValueConverter { public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { PreviewImageItem c = value […]