The code to draw the Timer is
XAML code: <Grid Width="16" Height="16" Name="Grid" Margin="2">
<Ellipse Stroke="#FF000000" StrokeEndLineCap="Round" StrokeStartLineCap="Round" StrokeThickness="1.5" Fill="#44FFFFFF"/>
<Path Stretch="Fill" Stroke="#FF000000" StrokeEndLineCap="Round" StrokeStartLineCap="Round" StrokeThickness="2" Margin="6,3,6,6" Data="M48,24 L48,19.25" Name="Path">
<Path.RenderTransform>
<RotateTransform x:Name="Rotator" Angle="0" CenterX="1" CenterY="5"/>
</Path.RenderTransform>
</Path>
</Grid>
and the code to animate it is
XAML code: <Storyboard>
<DoubleAnimation Storyboard.TargetName="Rotator"
Storyboard.TargetProperty="(RotateTransform.Angle)"
From="0" To="360" Duration="0:0:4" RepeatBehavior="Forever"/>
</Storyboard>
OK, so a dozen lines. It's still a hell of a lot better than GDI. |