LongListSelector不会加载所有图像

时间:2014-02-08 18:26:45

标签: c# .net windows-phone-8 windows-phone longlistselector

我正在使用带有JumpListStyle的LongListSelector,当我点击组头时,它会打开带有标题(图像+文本)的列表,但最后的图像没有加载。这是一张图片:

enter image description here

那么如何让LongListSelector加载所有图像呢?

1 个答案:

答案 0 :(得分:2)

我目前遇到同样的问题......

我的JumpListStyle是一张图片。 JumpList处于“列表”模式,就像你一样。

如果我单击LongListSelector中的标题(包含大约100个项目)而不滚动所有列表,则跳转列表(包含6个组)正在加载但缺少一些图像。 如果我单击没有图像的JumpList项目,然后返回JumpList,则会加载缺失的图像。 如果我滚动所有LongListSelector项,则JumpList现在正常(加载JumpList的所有图像)。

<Style x:Key="LongListSelectorJumpListStyle" TargetType="phone:LongListSelector">
    <Setter Property="GridCellSize"  Value="111,111"/>
    <Setter Property="LayoutMode" Value="List" />
    <Setter Property="Margin" Value="18,12,0,0"/>
    <Setter Property="ItemTemplate">
    <Setter.Value>
         <DataTemplate>
            <Border Background="{StaticResource SVodBackgroundBrush}" BorderBrush="Gray" BorderThickness="2"    
                        Height="62" Width="286" Margin="20,20,20,20"                 
                        HorizontalAlignment="Left"
                        Visibility="{Binding EmptyGroup, Converter={StaticResource VisibilityInverseConverter}}">
                 <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
                    <TextBlock Text="{Binding Key}" Visibility="{Binding Key, Converter={StaticResource ratingAvailableConverter}}" FontSize="30" Foreground="DarkGray" TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center" Width="Auto"/>
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                        <Image Source="{Binding Key, Converter={StaticResource allRatingsConverter}}"/>
                        <Grid Visibility="{Binding Key, Converter={StaticResource ratingUnavailableConverter}}" HorizontalAlignment="Center" VerticalAlignment="Center" Width="Auto">
                             <TextBlock Text="?" FontSize="40" Foreground="DarkGray" TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center" Width="Auto"/>
                        </Grid>
                    </StackPanel>
                </Grid>
            </Border>
        </DataTemplate>
    </Setter.Value>
    </Setter>
</Style>