<Page
    x:Class="ImageRotate.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:ImageRotate"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
        <Image Source="http://www.charlespetzold.com/pw6/PetzoldJersey.jpg"
               Stretch="None"
               HorizontalAlignment="Center"
               VerticalAlignment="Center">
            <Image.RenderTransform>
                <TransformGroup>
                    <TranslateTransform X="-160" Y="-200" />
                    <RotateTransform x:Name="rotate" />
                    <TranslateTransform X="160" Y="200" />
                </TransformGroup>
            </Image.RenderTransform>
        </Image>
    </Grid>
    
    <Page.Triggers>
        <EventTrigger>
            <BeginStoryboard>
                <Storyboard RepeatBehavior="Forever">
                    <DoubleAnimation Storyboard.TargetName="rotate"
                                     Storyboard.TargetProperty="Angle"
                                     From="0" To="360" Duration="0:0:3">
                        <DoubleAnimation.EasingFunction>
                            <ElasticEase EasingMode="EaseInOut" />
                        </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                </Storyboard>
            </BeginStoryboard>
        </EventTrigger>
    </Page.Triggers>
</Page>
