【问题标题】:Where can I find the Silverlight standard loading animation?在哪里可以找到 Silverlight 标准加载动画?
【发布时间】:2009-08-25 08:12:45
【问题描述】:

对于我的生活,我似乎找不到标准的 Silverlight 加载动画,带有旋转球的动画(嗯......看起来/听起来不太对......无论如何)......这在 SDK 中的某个地方?

有没有可以在 Silverlight 中使用的带有繁忙动画的网站?

【问题讨论】:

    标签: silverlight


    【解决方案1】:

    标准加载屏幕实际上嵌入在本机 Silverlight 代码中,因为它在 Core CLR 加载之前可用,并且实际上不是 ProgressBar 模板或类似的东西。

    这意味着您需要将其嵌入到您的应用程序中,无法直接在 XAML 中引用它或在代码中提取它。

    我环顾四周并找到了它。可以更新 LoadingText 命名文本块以将 0% 更改为有用的值。

    <Grid>
    <Grid.Triggers>
        <EventTrigger RoutedEvent='Canvas.Loaded'>
            <EventTrigger.Actions>
                <BeginStoryboard>
                    <Storyboard x:Name='LoadingAnimation2' AutoReverse='False' RepeatBehavior='Forever'>
                        <DoubleAnimationUsingKeyFrames BeginTime='00:00:00' Storyboard.TargetName='BubbleOne2' Storyboard.TargetProperty='(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)'>
                            <SplineDoubleKeyFrame KeyTime='00:00:00' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:00.3' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:00.6' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:02.2' Value='3'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:02.7' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:06.3' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:06.6' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:08.3' Value='3'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:08.8' Value='1'/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames BeginTime='00:00:00' Storyboard.TargetName='BubbleOne2' Storyboard.TargetProperty='(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)'>
                            <SplineDoubleKeyFrame KeyTime='00:00:00' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:00.3' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:00.6' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:02.2' Value='3'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:02.7' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:06.3' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:06.6' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:08.3' Value='3'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:08.8' Value='1'/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames BeginTime='00:00:00' Storyboard.TargetName='BubbleTwo2' Storyboard.TargetProperty='(UIElement.Opacity)'>
                            <SplineDoubleKeyFrame KeyTime='00:00:00' Value='0'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:00.5' Value='0'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:00.8' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:02.4' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:02.9' Value='0'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:06.1' Value='0'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:06.4' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:08.1' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:08.6' Value='0'/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames BeginTime='00:00:00' Storyboard.TargetName='BubbleThree2' Storyboard.TargetProperty='(UIElement.Opacity)'>
                            <SplineDoubleKeyFrame KeyTime='00:00:00' Value='0'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:00.7' Value='0'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:01' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:02.6' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:03.1' Value='0'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:05.9' Value='0'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:06.2' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:07.9' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:08.4' Value='0'/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames BeginTime='00:00:00' Storyboard.TargetName='BubbleFour2' Storyboard.TargetProperty='(UIElement.Opacity)'>
                            <SplineDoubleKeyFrame KeyTime='00:00:00' Value='0'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:00.9' Value='0'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:01.2' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:02.8' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:03.3' Value='0'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:05.7' Value='0'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:06' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:07.7' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:08.2' Value='0'/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames BeginTime='00:00:00' Storyboard.TargetName='BubbleFive2' Storyboard.TargetProperty='(UIElement.Opacity)'>
                            <SplineDoubleKeyFrame KeyTime='00:00:00' Value='0'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:01.1' Value='0'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:01.4' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:03' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:03.5' Value='0'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:05.5' Value='0'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:05.8' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:07.5' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:08' Value='0'/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames BeginTime='00:00:00' Storyboard.TargetName='BubbleSix2' Storyboard.TargetProperty='(UIElement.Opacity)'>
                            <SplineDoubleKeyFrame KeyTime='00:00:00' Value='0'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:01.3' Value='0'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:01.6' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:03.2' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:03.7' Value='0'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:05.3' Value='0'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:05.6' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:07.3' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:07.8' Value='0'/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames BeginTime='00:00:00' Storyboard.TargetName='BubbleSeven2' Storyboard.TargetProperty='(UIElement.Opacity)'>
                            <SplineDoubleKeyFrame KeyTime='00:00:00' Value='0'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:01.5' Value='0'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:01.8' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:03.4' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:03.9' Value='0'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:05.1' Value='0'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:05.4' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:07.1' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:07.6' Value='0'/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames BeginTime='00:00:00' Storyboard.TargetName='BubbleEight2' Storyboard.TargetProperty='(UIElement.Opacity)'>
                            <SplineDoubleKeyFrame KeyTime='00:00:00' Value='0'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:01.7' Value='0'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:02' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:03.6' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:04.1' Value='0'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:04.9' Value='0'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:05.2' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:06.9' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:07.4' Value='0'/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames BeginTime='00:00:00' Storyboard.TargetName='BubbleOne2' Storyboard.TargetProperty='(UIElement.Opacity)'>
                            <SplineDoubleKeyFrame KeyTime='00:00:00' Value='0'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:00.3' Value='0'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:00.6' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:02.2' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:02.7' Value='0'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:06.3' Value='0'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:06.6' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:08.3' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:08.8' Value='0'/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames BeginTime='00:00:00' Storyboard.TargetName='BubbleTwo2' Storyboard.TargetProperty='(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)'>
                            <SplineDoubleKeyFrame KeyTime='00:00:00.8' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:02.4' Value='3'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:02.9' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:06.1' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:06.4' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:08.1' Value='3'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:08.6' Value='1'/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames BeginTime='00:00:00' Storyboard.TargetName='BubbleTwo2' Storyboard.TargetProperty='(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)'>
                            <SplineDoubleKeyFrame KeyTime='00:00:00.8' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:02.4' Value='3'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:02.9' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:06.1' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:06.4' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:08.1' Value='3'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:08.6' Value='1'/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames BeginTime='00:00:00' Storyboard.TargetName='BubbleThree2' Storyboard.TargetProperty='(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)'>
                            <SplineDoubleKeyFrame KeyTime='00:00:01' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:02.6' Value='3'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:03.1' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:05.9' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:06.2' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:07.9' Value='3'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:08.4' Value='1'/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames BeginTime='00:00:00' Storyboard.TargetName='BubbleThree2' Storyboard.TargetProperty='(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)'>
                            <SplineDoubleKeyFrame KeyTime='00:00:01' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:02.6' Value='3'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:03.1' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:05.9' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:06.2' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:07.9' Value='3'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:08.4' Value='1'/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames BeginTime='00:00:00' Storyboard.TargetName='BubbleFour2' Storyboard.TargetProperty='(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)'>
                            <SplineDoubleKeyFrame KeyTime='00:00:01.2' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:02.8' Value='3'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:03.3' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:05.7' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:06' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:07.7' Value='3'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:08.2' Value='1'/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames BeginTime='00:00:00' Storyboard.TargetName='BubbleFour2' Storyboard.TargetProperty='(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)'>
                            <SplineDoubleKeyFrame KeyTime='00:00:01.2' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:02.8' Value='3'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:03.3' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:05.7' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:06' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:07.7' Value='3'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:08.2' Value='1'/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames BeginTime='00:00:00' Storyboard.TargetName='BubbleFive2' Storyboard.TargetProperty='(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)'>
                            <SplineDoubleKeyFrame KeyTime='00:00:01.4' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:03' Value='3'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:03.5' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:05.5' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:05.8' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:07.5' Value='3'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:08' Value='1'/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames BeginTime='00:00:00' Storyboard.TargetName='BubbleFive2' Storyboard.TargetProperty='(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)'>
                            <SplineDoubleKeyFrame KeyTime='00:00:01.4' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:03' Value='3'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:03.5' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:05.5' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:05.8' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:07.5' Value='3'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:08' Value='1'/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames BeginTime='00:00:00' Storyboard.TargetName='BubbleSix2' Storyboard.TargetProperty='(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)'>
                            <SplineDoubleKeyFrame KeyTime='00:00:01.6' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:03.2' Value='3'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:03.7' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:05.3' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:05.6' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:07.3' Value='3'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:07.8' Value='1'/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames BeginTime='00:00:00' Storyboard.TargetName='BubbleSix2' Storyboard.TargetProperty='(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)'>
                            <SplineDoubleKeyFrame KeyTime='00:00:01.6' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:03.2' Value='3'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:03.7' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:05.3' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:05.6' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:07.3' Value='3'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:07.8' Value='1'/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames BeginTime='00:00:00' Storyboard.TargetName='BubbleSeven2' Storyboard.TargetProperty='(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)'>
                            <SplineDoubleKeyFrame KeyTime='00:00:01.8' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:03.4' Value='3'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:03.9' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:05.1' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:05.4' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:07.1' Value='3'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:07.6' Value='1'/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames BeginTime='00:00:00' Storyboard.TargetName='BubbleSeven2' Storyboard.TargetProperty='(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)'>
                            <SplineDoubleKeyFrame KeyTime='00:00:01.8' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:03.4' Value='3'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:03.9' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:05.1' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:05.4' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:07.1' Value='3'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:07.6' Value='1'/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames BeginTime='00:00:00' Storyboard.TargetName='BubbleEight2' Storyboard.TargetProperty='(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)'>
                            <SplineDoubleKeyFrame KeyTime='00:00:02' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:03.6' Value='3'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:04.1' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:04.9' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:05.2' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:06.9' Value='3'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:07.4' Value='1'/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames BeginTime='00:00:00' Storyboard.TargetName='BubbleEight2' Storyboard.TargetProperty='(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)'>
                            <SplineDoubleKeyFrame KeyTime='00:00:02' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:03.6' Value='3'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:04.1' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:04.9' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:05.2' Value='1'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:06.9' Value='3'/>
                            <SplineDoubleKeyFrame KeyTime='00:00:07.4' Value='1'/>
                        </DoubleAnimationUsingKeyFrames>
                    </Storyboard>
                </BeginStoryboard>
            </EventTrigger.Actions>
        </EventTrigger>
    </Grid.Triggers>
    <Canvas Width='110' Height='110' >
        <Ellipse x:Name='BubbleOne2' Width='10' Height='10' Canvas.Left='78' Canvas.Top='78' Stretch='Fill' RenderTransformOrigin='0.5,0.5'>
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX='1' ScaleY='1'/>
                </TransformGroup>
            </Ellipse.RenderTransform>
            <Ellipse.Fill>
                <RadialGradientBrush RadiusX='0.477272' RadiusY='0.477268' Center='0.5,0.5' GradientOrigin='0.5,0.5'>
                    <GradientStop Color='#990D96D8' Offset='0'/>
                    <GradientStop Color='#000D96D8' Offset='1'/>
                </RadialGradientBrush>
            </Ellipse.Fill>
        </Ellipse>
        <Ellipse x:Name='BubbleTwo2' Width='10' Height='10' Canvas.Left='90' Canvas.Top='50' Stretch='Fill' RenderTransformOrigin='0.5,0.5' >
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX='1' ScaleY='1'/>
                </TransformGroup>
            </Ellipse.RenderTransform>
            <Ellipse.Fill>
                <RadialGradientBrush RadiusX='0.477272' RadiusY='0.477268' Center='0.5,0.5' GradientOrigin='0.5,0.5'>
                    <GradientStop Color='#990D96D8' Offset='0'/>
                    <GradientStop Color='#000D96D8' Offset='1'/>
                </RadialGradientBrush>
            </Ellipse.Fill>
        </Ellipse>
        <Ellipse x:Name='BubbleThree2' Width='10' Height='10' Canvas.Left='78' Canvas.Top='22' Stretch='Fill' RenderTransformOrigin='0.5,0.5'>
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX='1' ScaleY='1'/>
                </TransformGroup>
            </Ellipse.RenderTransform>
            <Ellipse.Fill>
                <RadialGradientBrush RadiusX='0.477272' RadiusY='0.477268' Center='0.5,0.5' GradientOrigin='0.5,0.5'>
                    <GradientStop Color='#990D96D8' Offset='0'/>
                    <GradientStop Color='#000D96D8' Offset='1'/>
                </RadialGradientBrush>
            </Ellipse.Fill>
        </Ellipse>
        <Ellipse x:Name='BubbleFour2' Width='10' Height='10' Canvas.Left='50' Canvas.Top='10' Stretch='Fill' RenderTransformOrigin='0.5,0.5' >
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX='1' ScaleY='1'/>
                </TransformGroup>
            </Ellipse.RenderTransform>
            <Ellipse.Fill>
                <RadialGradientBrush RadiusX='0.477272' RadiusY='0.477268' Center='0.5,0.5' GradientOrigin='0.5,0.5'>
                    <GradientStop Color='#990D96D8' Offset='0'/>
                    <GradientStop Color='#000D96D8' Offset='1'/>
                </RadialGradientBrush>
            </Ellipse.Fill>
        </Ellipse>
        <Ellipse x:Name='BubbleFive2' Width='10' Height='10' Canvas.Left='22' Canvas.Top='22' Stretch='Fill' RenderTransformOrigin='0.5,0.5' >
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX='1' ScaleY='1'/>
                </TransformGroup>
            </Ellipse.RenderTransform>
            <Ellipse.Fill>
                <RadialGradientBrush RadiusX='0.477272' RadiusY='0.477268' Center='0.5,0.5' GradientOrigin='0.5,0.5'>
                    <GradientStop Color='#990D96D8' Offset='0'/>
                    <GradientStop Color='#000D96D8' Offset='1'/>
                </RadialGradientBrush>
            </Ellipse.Fill>
        </Ellipse>
        <Ellipse x:Name='BubbleSix2' Width='10' Height='10' Canvas.Left='10' Canvas.Top='50' Stretch='Fill' RenderTransformOrigin='0.5,0.5' >
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX='1' ScaleY='1'/>
                </TransformGroup>
            </Ellipse.RenderTransform>
            <Ellipse.Fill>
                <RadialGradientBrush RadiusX='0.477272' RadiusY='0.477268' Center='0.5,0.5' GradientOrigin='0.5,0.5'>
                    <GradientStop Color='#990D96D8' Offset='0'/>
                    <GradientStop Color='#000D96D8' Offset='1'/>
                </RadialGradientBrush>
            </Ellipse.Fill>
        </Ellipse>
        <Ellipse x:Name='BubbleSeven2' Width='10' Height='10' Canvas.Left='22' Canvas.Top='78' Stretch='Fill' RenderTransformOrigin='0.5,0.5' >
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX='1' ScaleY='1'/>
                </TransformGroup>
            </Ellipse.RenderTransform>
            <Ellipse.Fill>
                <RadialGradientBrush RadiusX='0.477272' RadiusY='0.477268' Center='0.5,0.5' GradientOrigin='0.5,0.5'>
                    <GradientStop Color='#990D96D8' Offset='0'/>
                    <GradientStop Color='#000D96D8' Offset='1'/>
                </RadialGradientBrush>
            </Ellipse.Fill>
        </Ellipse>
        <Ellipse x:Name='BubbleEight2' Width='10' Height='10' Canvas.Left='50' Canvas.Top='90' Stretch='Fill' RenderTransformOrigin='0.5,0.5' >
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX='1' ScaleY='1'/>
                </TransformGroup>
            </Ellipse.RenderTransform>
            <Ellipse.Fill>
                <RadialGradientBrush RadiusX='0.477272' RadiusY='0.477268' Center='0.5,0.5' GradientOrigin='0.5,0.5'>
                    <GradientStop Color='#990D96D8' Offset='0'/>
                    <GradientStop Color='#000D96D8' Offset='1'/>
                </RadialGradientBrush>
            </Ellipse.Fill>
        </Ellipse>
    </Canvas>
    <TextBlock FontFamily='Verdana' FontSize='11' Text='0%' x:Name='LoadingText' HorizontalAlignment='Center' VerticalAlignment='Center'/>
    

    【讨论】:

    • 运气好吗?我想确保您能够在您的应用中使用此功能。
    【解决方案2】:

    我认为这正是您正在寻找的(即:漩涡状的蓝色球......嗯,这听起来也不是很好):

    首先,从this link 下载图片。将“assets”文件夹添加到“ClientBin”文件夹中。

    接下来,将以下画布添加到您的 XAML

    <Canvas x:Name="progressIndicator" Opacity="1" Canvas.Left="480" Canvas.Top="230" Width="50" Height="30">
            <Canvas.Resources>
                <Storyboard x:Name="loadingIndicator" Duration="00:00:0.03" Completed="loadingIndicator_Completed">
                </Storyboard>
        </Canvas.Resources>
    </Canvas>
    

    最后,将以下内容添加到您的 XAML 代码后面

            const int TotalImages = 101;
            int CurrentImage = 0;
    
            public MainPage()
            {
                InitializeComponent();
                PreLoadImages();
                this.loadingIndicator.Begin();
            }
    
            public void PreLoadImages()
            {
                Image img = new Image();
                img.Name = "ll_0";
                img.Opacity = 1;
                img.Source = new System.Windows.Media.Imaging.BitmapImage(new Uri("/assets/images/loader_loop_00000.png", UriKind.Relative));
                progressIndicator.Children.Add(img);
                for(int i = 1;i <= TotalImages;i++) {
                    img = new Image();
                    img.Name = "ll_" + i.ToString();
                    img.Opacity = 0;
                    img.Source = new System.Windows.Media.Imaging.BitmapImage(new Uri("/assets/images/loader_loop_00" + i.ToString("000") + ".png", UriKind.Relative));
                    img.Width = 30;
                    img.Height = 30;
                    progressIndicator.Children.Add(img);
                }
            }
    
            private void loadingIndicator_Completed(object sender, EventArgs e)
            {
                Image currentImage = (Image)FindName("ll_" + CurrentImage.ToString());
                currentImage.Opacity = 0;
                CurrentImage++;
                if (CurrentImage >= TotalImages) { 
                    CurrentImage = 0; 
                }
                    currentImage = (Image)FindName("ll_" + CurrentImage.ToString());
                    currentImage.Opacity = 1;
    
                    loadingIndicator.Begin();
    
            }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-07-08
      • 1970-01-01
      • 1970-01-01
      • 2015-02-03
      • 2019-04-14
      • 1970-01-01
      • 1970-01-01
      • 2011-12-06
      相关资源
      最近更新 更多