<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="using:Microsoft.Toolkit.Uwp.UI.Controls">

    <Style TargetType="local:OrbitView">
        <Setter Property="IsFocusEngagementEnabled" Value="True" />
        <Setter Property="UseSystemFocusVisuals" Value="True" />
        <Setter Property="AnchorColor" Value="{ThemeResource SystemControlForegroundBaseHighBrush}" />
        <Setter Property="OrbitColor" Value="{ThemeResource SystemControlForegroundBaseHighBrush}" />
        <Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseHighBrush}" />
        <Setter Property="Background" Value="{ThemeResource SystemControlBackgroundAltHighBrush}" />
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <local:OrbitViewPanel />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:OrbitView">
                    <Grid Background="{TemplateBinding Background}">
                        <Grid x:Name="OrbitGrid" />
                        <Canvas x:Name="AnchorCanvas" />
                        <ItemsPresenter HorizontalAlignment="Stretch"
                                        VerticalAlignment="Stretch" />
                        <ContentPresenter x:Name="CenterContent"
                                          HorizontalAlignment="Center"
                                          VerticalAlignment="Center"
                                          Content="{TemplateBinding CenterContent}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:OrbitViewItem">
        <Setter Property="Background" Value="{ThemeResource SystemControlBackgroundBaseLowBrush}" />
        <Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseHighBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:OrbitViewItem">
                    <Grid x:Name="RootGrid">
                        <ContentPresenter x:Name="ContentPresenter"
                                          Content="{TemplateBinding Content}">
                            <ContentPresenter.RenderTransform>
                                <CompositeTransform x:Name="Transform" />
                            </ContentPresenter.RenderTransform>
                        </ContentPresenter>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Transform"
                                                                       Storyboard.TargetProperty="ScaleX">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Transform"
                                                                       Storyboard.TargetProperty="ScaleY">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <PointerUpThemeAnimation Storyboard.TargetName="RootGrid" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="PointerOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Transform"
                                                                       Storyboard.TargetProperty="ScaleX">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="1.1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Transform"
                                                                       Storyboard.TargetProperty="ScaleY">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="1.1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <PointerUpThemeAnimation Storyboard.TargetName="RootGrid" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Transform"
                                                                           Storyboard.TargetProperty="ScaleX">
                                                <DiscreteObjectKeyFrame KeyTime="0"
                                                                        Value="0.8" />
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Transform"
                                                                           Storyboard.TargetProperty="ScaleY">
                                                <DiscreteObjectKeyFrame KeyTime="0"
                                                                        Value="0.8" />
                                            </ObjectAnimationUsingKeyFrames>
                                            <PointerDownThemeAnimation Storyboard.TargetName="RootGrid" />
                                        </Storyboard>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>

