<Application
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:local="clr-namespace:ForzaUI"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    x:Class="ForzaUI.App">

    <Application.Resources>
        <ResourceDictionary>
              <local:UIResolutionScaler x:Key="PART_UIResolutionScaler" />

              <ResourceDictionary.MergedDictionaries>
              <!-- Forza Resources -->
              <ResourceDictionary Source="SystemResources.xaml"/>

              <!-- Keep this up to date with the Anthem App -->
              <ResourceDictionary Source="Resources/Anthem/Global_Theme_Default.xaml"/>
              <ResourceDictionary Source="Resources/Anthem/Global_Colors.xaml"/>
              <ResourceDictionary Source="Resources/Anthem/Global_Converters.xaml"/>
              <ResourceDictionary Source="Resources/Anthem/Global_Sizes.xaml"/>
              <ResourceDictionary Source="Resources/Anthem/Global_Brushes.xaml"/>
              <ResourceDictionary Source="Resources/Anthem/Global_Transitions.xaml"/>
              <ResourceDictionary Source="Resources/Anthem/Global_Material.xaml"/>
              <ResourceDictionary Source="Resources/Anthem/Global_TextStyles.xaml"/>
              <ResourceDictionary Source="Resources/Anthem/Global_Timings.xaml"/>
              <ResourceDictionary Source="Resources/Anthem/Global_Textures.xaml"/>
              <ResourceDictionary Source="Resources/Anthem/Global_Controls.xaml"/>
              <ResourceDictionary Source="Resources/Anthem/Global_Transforms.xaml"/>
              <ResourceDictionary Source="Resources/Anthem/Global_DefaultStyles.xaml"/>

              <!-- All shared dictionarys go here -->
              <ResourceDictionary Source="Resources/Anthem/Shared_PlayerLevel.xaml" />
              <ResourceDictionary Source="Resources/Anthem/Shared_Bars.xaml" />
              <ResourceDictionary Source="Resources/Anthem/Shared_CarInfoControls.xaml" />
              <ResourceDictionary Source="Resources/Anthem/Shared_PostRaceCutscenes.xaml" />
              <ResourceDictionary Source="Resources/Anthem/Shared_CarLoadingCutscenes.xaml" />
              <ResourceDictionary Source="Resources/Anthem/Shared_Carousel.xaml" />
              <ResourceDictionary Source="Resources/Anthem/Shared_CarSelect.xaml" />
              <ResourceDictionary Source="Resources/Anthem/Shared_CarStats.xaml" />
              <ResourceDictionary Source="Resources/Anthem/Shared_DesignSelection.xaml" />
              <ResourceDictionary Source="Resources/Anthem/Shared_MultiplayerLobby.xaml" />
              <ResourceDictionary Source="Resources/Anthem/Shared_DriverList.xaml" />
              <ResourceDictionary Source="Resources/Anthem/Shared_TiledMenus.xaml" />
              <ResourceDictionary Source="Resources/Anthem/Shared_LiveTile.xaml" />
              <ResourceDictionary Source="Resources/Anthem/Shared_GarageMenus.xaml" />
              <ResourceDictionary Source="Resources/Anthem/Shared_Hud.xaml" />
              <ResourceDictionary Source="Resources/Anthem/Shared_Infographics.xaml" />
              <ResourceDictionary Source="Resources/Anthem/Shared_Map.xaml"/>
              <ResourceDictionary Source="Resources/Anthem/Shared_Leaderboard.xaml" />
              <ResourceDictionary Source="Resources/Anthem/Shared_LiveryMenus.xaml" />
              <ResourceDictionary Source="Resources/Anthem/Shared_LoadingScreens.xaml"/>
              <ResourceDictionary Source="Resources/Anthem/Shared_Marketplace.xaml"/>
              <ResourceDictionary Source="Resources/Anthem/Shared_MessagesLiveTile.xaml" />
              <ResourceDictionary Source="Resources/Anthem/Shared_TextMenus.xaml" />
              <ResourceDictionary Source="Resources/Anthem/Shared_GridMenus.xaml" />
              <ResourceDictionary Source="Resources/Anthem/Shared_OptionsScreens.xaml" />
              <ResourceDictionary Source="Resources/Anthem/Shared_Rivals.xaml" />
              <ResourceDictionary Source="Resources/Anthem/Shared_Spinners.xaml" />
              <ResourceDictionary Source="Resources/Anthem/Shared_ClubDetail.xaml" />
              <ResourceDictionary Source="Resources/Anthem/Shared_ClubNoticeboard.xaml" />
              <ResourceDictionary Source="Resources/Anthem/Shared_Popups.xaml" />
              <ResourceDictionary Source="Resources/Anthem/Shared_EventBlueprints.xaml" />
              <ResourceDictionary Source="Resources/Anthem/Shared_BucketListBlueprints.xaml" />
              <ResourceDictionary Source="Resources/Anthem/Shared_AuctionHouse.xaml" />
              <ResourceDictionary Source="Resources/Anthem/Shared_FeaturedLiveTile.xaml" />
              <ResourceDictionary Source="Resources/Anthem/Shared_ForzaEvents.xaml" />
              <ResourceDictionary Source="Resources/Anthem/Shared_Spatial.xaml" />
              <ResourceDictionary Source="Resources/Anthem/Shared_Tombola.xaml" />
              <ResourceDictionary Source="Resources/Anthem/Shared_PanelStarRewards.xaml" />
              <ResourceDictionary Source="Resources/Anthem/Shared_Leagues.xaml" />
              <ResourceDictionary Source="Resources/Anthem/Shared_RewardPreview.xaml" />
            </ResourceDictionary.MergedDictionaries>

            <Style x:Key="A_Style_Page_Generic" TargetType="{x:Type Page}" >
                <Style.Triggers>
                    <DataTrigger Binding="{Binding IsUIVisible}"
                                 Value="False">
                        <Setter Property="Opacity"
                                Value="0" />
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_PageStyle_AR_Activation"
               BasedOn="{StaticResource A_Style_ScreenSize}"
               TargetType="Page">
                <Style.Triggers>
                    <DataTrigger Binding="{Binding ShownOnHUD}"
                                 Value="True">
                        <DataTrigger.EnterActions>
                            <BeginStoryboard x:Name="BeginShownOnHUD">
                                <BeginStoryboard.Storyboard>
                                    <local:UIStoryboard DurationOverride="0:0:0.3">
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <EasingDoubleKeyFrame KeyTime="0:0:1"
                                                                  Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </local:UIStoryboard>
                                </BeginStoryboard.Storyboard>
                            </BeginStoryboard>
                        </DataTrigger.EnterActions>
                        <DataTrigger.ExitActions>
                            <StopStoryboard BeginStoryboardName="BeginShownOnHUD" />
                        </DataTrigger.ExitActions>
                    </DataTrigger>
                </Style.Triggers>
            </Style>
        </ResourceDictionary>
    </Application.Resources>
</Application>
