对于我的生活,我似乎无法找到标准的Silverlight加载动画,一个旋转球(嗯......只是看起来不合适/听起来不对......)是...这个在SDK的某个地方?
是否有任何可以在Silverlight中使用繁忙动画的网站?
答案 0 :(得分:5)
标准加载屏幕实际上嵌入在原生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'/>
答案 1 :(得分: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();
}