当用户触发时,我的应用程序将从网络下载数据。用户可以触发多个下载。每个下载都列在堆栈面板中,在每个项目上显示一个繁忙的图标,该图标在下载时旋转。
<Image x:Name="rotatingCircle" Source="{StaticResource busy_icon}" Height="30" RenderTransformOrigin=".5,.5" Visibility="Visible"> <Image.RenderTransform> <RotateTransform x:Name="AnimatedRotateTransform" Angle="0" /> </Image.RenderTransform> <Image.Style> <Style> <Style.Triggers> <Trigger Property="Image.IsEnabled" Value="True"> <Trigger.EnterActions> <BeginStoryboard> <Storyboard> <DoubleAnimation Storyboard.TargetProperty="RenderTransform.Angle" From="0" To="360" Duration="0:0:1" RepeatBehavior="Forever"/> </Storyboard> </BeginStoryboard>