我有一个 ItemsPage。当用户导航时,应用程序会下载一些图像。我想在每个人身上看到 ProgressRing。
我的 GridView 模板
<GridView.ItemTemplate>
<DataTemplate>
<Grid HorizontalAlignment="Left"
Width="150"
Height="230">
<Canvas>
<ProgressRing x:Name="imageProgress"
Canvas.ZIndex="10"
Width="100"
Height="100"
HorizontalAlignment="Left"
Grid.Column="0" />
<Image x:Name="FilmImage"
Source="{Binding Image}"
Stretch="UniformToFill"
AutomationProperties.Name="{Binding Title}" />
</Canvas>
<StackPanel VerticalAlignment="Bottom"
Background="{StaticResource ListViewItemOverlayBackgroundThemeBrush}">
<TextBlock Text="{Binding Title}"
Foreground="{StaticResource ListViewItemOverlayForegroundThemeBrush}"
Style="{StaticResource TitleTextStyle}"
Height="60"
Margin="15,0,15,0" />
<TextBlock Text="{Binding Subtitle}"
Foreground="{StaticResource ListViewItemOverlaySecondaryForegroundThemeBrush}"
Style="{StaticResource CaptionTextStyle}"
TextWrapping="NoWrap"
Margin="15,0,15,10" />
</StackPanel>
</Grid>
</DataTemplate>
</GridView.ItemTemplate>
我的.cs
public sealed partial class AllCinemas : LayoutAwarePage
{
protected async override void LoadState(Object navigationParameter, Dictionary<String, Object> pageState)
{
FeedAllCinemas allCinemas = new FeedAllCinemas();
allCinemas.GetAllCinemas("", "");
this.DefaultViewModel["Items"] = allCinemas.Cinemas;
}
}