<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:s="clr-namespace:System;assembly=mscorlib">
<Page.Resources>
<FrameworkElement x:Key="dt" Tag="{x:Static s:DateTime.Now}" />
<TransformGroup x:Key="angleSecond">
<ScaleTransform
ScaleX="{Binding Source={StaticResource dt}, Path=Tag.Second}" />
<ScaleTransform ScaleX="6" />
</TransformGroup>
<Style TargetType="{x:Type Path}">
<Setter Property="Stroke"
Value="{DynamicResource
{x:Static SystemColors.WindowTextBrushKey}}" />
<Setter Property="StrokeThickness" Value="2" />
<Setter Property="StrokeStartLineCap" Value="Round" />
<Setter Property="StrokeEndLineCap" Value="Round" />
<Setter Property="StrokeLineJoin" Value="Round" />
<Setter Property="StrokeDashCap" Value="Round" />
</Style>
</Page.Resources>
<Viewbox>
<Canvas Width="200" Height="200">
<Canvas.RenderTransform>
<TranslateTransform X="100" Y="100" />
</Canvas.RenderTransform>
<Path Data="M 0 -90 A 90 90 0 1 1 -0.01 -90"
StrokeDashArray="0 7.854"
StrokeThickness="6" />
<Path Data="M 0 10 L 0 -80">
<Path.RenderTransform>
<RotateTransform x:Name="xformSecond"
Angle="{Binding Source={StaticResource angleSecond},
Path=Value.M11}" />
</Path.RenderTransform>
</Path>
</Canvas>
</Viewbox>
<Page.Triggers>
<EventTrigger RoutedEvent="Canvas.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="xformSecond"
Storyboard.TargetProperty="Angle"
From="0" To="360" Duration="0:1:0"
IsAdditive="True"
RepeatBehavior="Forever" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Page.Triggers>
</Page>
|