<Page
    x:Class="AnimatedPieSlice.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:AnimatedPieSlice"
    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}">
        <local:PieSlice x:Name="pieSlice"
                        Center="400 400"
                        Radius="200"
                        Stroke="Red"
                        StrokeThickness="3"
                        Fill="Yellow" />
    </Grid>
    
    <Page.Triggers>
        <EventTrigger>
            <BeginStoryboard>
                <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="pieSlice"
                                     Storyboard.TargetProperty="SweepAngle"
                                     EnableDependentAnimation="True"
                                     From="1" To="359" Duration="0:0:3"
                                     AutoReverse="True"
                                     RepeatBehavior="Forever" />
                </Storyboard>
            </BeginStoryboard>
        </EventTrigger>
    </Page.Triggers>
</Page>
