Sliverlight学习日志(陈立东)

当你停下脚步的时候,想想有很多人还在继续奔跑~!Sliverlight
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

Searching

Posted on 2009-07-21 22:04  陈立东  阅读(188)  评论(0)    收藏  举报

<UserControl
 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 x:Class="LiveSearch.Searching"
 x:Name="UserControl"
 Width="Auto" Height="Auto" xmlns:d="http://schemas.microsoft.com/expression/blend/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">

 <UserControl.Resources>
  <Storyboard x:Key="Searching">
   <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" RepeatBehavior="Forever" Storyboard.TargetName="path" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
    <SplineDoubleKeyFrame KeyTime="00:00:00.6000000" Value="360"/>
   </DoubleAnimationUsingKeyFrames>
  </Storyboard>
 </UserControl.Resources>
 <UserControl.Triggers>
  <EventTrigger RoutedEvent="FrameworkElement.Loaded">
   <BeginStoryboard Storyboard="{StaticResource Searching}"/>
  </EventTrigger>
 </UserControl.Triggers>

 <Grid x:Name="LayoutRoot">
  <Ellipse Opacity="0.1" Width="58" Height="58" Fill="#FF000000" Stroke="{x:Null}" Margin="24,0,24,0" d:LayoutOverrides="GridBox"/>
  <Ellipse Opacity="0.1" Width="54" Height="54" Fill="#FF000000" Stroke="{x:Null}" Margin="24,0,24,0" Grid.Row="54"/>
  <Ellipse Opacity="0.1" Width="52" Height="52" Fill="#FF000000" Stroke="{x:Null}" Margin="0,0,0,0"/>
  <Ellipse Opacity="1" Width="50" Height="50" Fill="{DynamicResource WebSearch_FooterBackground}" Stroke="{x:Null}"/>
  <Grid Opacity="1" x:Name="searching" Width="100" Height="51" HorizontalAlignment="Stretch" Margin="0,0,0,0" VerticalAlignment="Stretch">
   <Path Opacity="0.54" RenderTransformOrigin="0.5,0.5" Fill="{x:Null}" Stretch="Fill" StrokeThickness="7" Margin="0,0,0,0" x:Name="path" Width="30" Height="30">
    <Path.RenderTransform>
     <TransformGroup>
      <ScaleTransform ScaleX="1" ScaleY="1"/>
      <SkewTransform AngleX="0" AngleY="0"/>
      <RotateTransform Angle="0"/>
      <TranslateTransform X="0" Y="0"/>
     </TransformGroup>
    </Path.RenderTransform>
    <Path.Stroke>
     <LinearGradientBrush EndPoint="0.602,1.024" StartPoint="0.718,0.354">
      <GradientStop Color="#FFFFFFFF" Offset="0"/>
      <GradientStop Color="#00FFFFFF" Offset="1"/>
     </LinearGradientBrush>
    </Path.Stroke>
    <Path.Data>
     <PathGeometry>
      <PathFigure IsClosed="False" StartPoint="17,30.5">
       <PolyBezierSegment IsSmoothJoin="True" Points="9.5441559,30.5 3.5,24.455844 3.5,17 3.5,9.5441559 9.5441559,3.5 17,3.5 24.455844,3.5 30.5,9.5441559 30.5,17"/>
      </PathFigure>
     </PathGeometry>
    </Path.Data>
   </Path>
  </Grid>
 </Grid>
</UserControl>