<UserControl x:Class="MultiDispatcherTest.Spinner"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
			 RenderTransformOrigin="0.5,0.5"
             Name="SpinnerControl" Visibility="Visible">
	<UserControl.Resources>
		<Storyboard x:Key="SpinningAnimation" >
			<DoubleAnimation Duration="0:0:1.5" From="0" RepeatBehavior="Forever" Storyboard.TargetProperty="RenderTransform.Angle" To="360" />
		</Storyboard>
		<!--<Style x:Key="SpinnerStyle" TargetType="{x:Type Image}">
			<Style.Triggers>
				<EventTrigger RoutedEvent="Loaded" >
					<BeginStoryboard Name="BeginSpinning" Storyboard="{StaticResource SpinningAnimation}" />
				</EventTrigger>
				<EventTrigger RoutedEvent="Unloaded" >
					<RemoveStoryboard BeginStoryboardName="BeginSpinning"/>
				</EventTrigger>
			</Style.Triggers>
		</Style>-->
	</UserControl.Resources>
	<Image Name="SpinnerImage" Width="64" Height="64" Source="/MultiDispatcherTest;component/spinner.png">
		<Image.RenderTransform>
			<RotateTransform Angle="0" CenterX="32" CenterY="32" />
		</Image.RenderTransform>
		<Image.Style>
			<Style TargetType="{x:Type Image}">
				<Style.Triggers>
					<EventTrigger RoutedEvent="Control.Loaded" >
						<BeginStoryboard Storyboard="{StaticResource SpinningAnimation}" >
							<!--<Storyboard>
								<DoubleAnimation Duration="0:0:1.5" From="0" RepeatBehavior="Forever" Storyboard.TargetProperty="RanderTransform.Angle" To="360" />
							</Storyboard>-->
						</BeginStoryboard>
					</EventTrigger>
				</Style.Triggers>
			</Style>
		</Image.Style>
	</Image>
</UserControl>