<Page x:Class="ForzaUI.A_UnlockRadioStation"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:local="clr-namespace:ForzaUI;assembly="
      mc:Ignorable="d"
      xmlns:System="clr-namespace:System;assembly=mscorlib"
      DataContext="{Binding RelativeSource={RelativeSource Self}}">
    <Page.Resources>

        <local:RadioStationTileMenuDataItem x:Key="A_DataItem_HorizonPulse"
                                            Description="{local:Loc MyProfile.IDS_RadioStationDesc1_Name}"
                                            Heading=""
                                            Icon="/ForzaUI;component/Textures/Anthem/RadioStations/Signing/HorizonPulse.png"
                                            SignedBackgroundImage="/ForzaUI;component/Textures/Anthem/RadioStations/Signing/HorizonPulse_signed.png"
                                            />
        <local:RadioStationTileMenuDataItem x:Key="A_DataItem_HorizonBassArena"
                                            Description="{local:Loc MyProfile.IDS_RadioStationDesc2_Name}"
                                            Heading=""
                                            Icon="/ForzaUI;component/Textures/Anthem/RadioStations/Signing/HorizonBassArena.png"
                                            SignedBackgroundImage="/ForzaUI;component/Textures/Anthem/RadioStations/Signing/HorizonBassArena_signed.png"
                                            />
        <local:RadioStationTileMenuDataItem x:Key="A_DataItem_HorizonBlockParty"
                                            Description="{local:Loc MyProfile.IDS_RadioStationDesc3_Name}"
                                            Heading=""
                                            Icon="/ForzaUI;component/Textures/Anthem/RadioStations/Signing/HorizonBlockParty.png"
                                            SignedBackgroundImage="/ForzaUI;component/Textures/Anthem/RadioStations/Signing/HorizonBlockParty_signed.png"
                                            />
        <local:RadioStationTileMenuDataItem x:Key="A_DataItem_TimelessFM"
                                            Description="{local:Loc MyProfile.IDS_RadioStationDesc8_Name}"
                                            Heading=""
                                            Icon="/ForzaUI;component/Textures/Anthem/RadioStations/Signing/Levante.png"
                                            SignedBackgroundImage="/ForzaUI;component/Textures/Anthem/RadioStations/Signing/Levante_signed.png"
                                            />
        <local:RadioStationTileMenuDataItem x:Key="A_DataItem_Vagrant"
                                            Description="{local:Loc MyProfile.IDS_RadioStationDesc4_Name}"
                                            Heading=""
                                            Icon="/ForzaUI;component/Textures/Anthem/RadioStations/Signing/Vagrant.png"
                                            SignedBackgroundImage="/ForzaUI;component/Textures/Anthem/RadioStations/Signing/Vagrant_signed.png"
                                            />
        <local:RadioStationTileMenuDataItem x:Key="A_DataItem_Epitaph"
                                            Description="{local:Loc MyProfile.IDS_RadioStationDesc5_Name}"
                                            Heading=""
                                            Icon="/ForzaUI;component/Textures/Anthem/RadioStations/Signing/Epitaph.png"
                                            SignedBackgroundImage="/ForzaUI;component/Textures/Anthem/RadioStations/Signing/Epitaph_signed.png"
                                            />
        <local:RadioStationTileMenuDataItem x:Key="A_DataItem_Hospital"
                                            Description="{local:Loc MyProfile.IDS_RadioStationDesc6_Name}"
                                            Heading=""
                                            Icon="/ForzaUI;component/Textures/Anthem/RadioStations/Signing/Hospital.png"
                                            SignedBackgroundImage="/ForzaUI;component/Textures/Anthem/RadioStations/Signing/Hospital_signed.png"
                                            />
        <local:RadioStationTileMenuDataItem x:Key="A_DataItem_FutureClassics"
                                            Description="{local:Loc MyProfile.IDS_RadioStationDesc7_Name}"
                                            Heading=""
                                            Icon="/ForzaUI;component/Textures/Anthem/RadioStations/Signing/fc.png"
                                            SignedBackgroundImage="/ForzaUI;component/Textures/Anthem/RadioStations/Signing/fc_signed.png"
                                            />
        <local:RadioStationTileMenuDataItem x:Key="A_DataItem_Groove"
                                            Description="{local:Loc MyProfile.IDS_RadioStationDesc9_Name}"
                                            Heading=""
                                            Icon="/ForzaUI;component/Textures/Anthem/RadioStations/Signing/Groove.png"
                                            SignedBackgroundImage="/ForzaUI;component/Textures/Anthem/RadioStations/Signing/Groove_signed.png"
                                            />

        <Style x:Key="A_Style_FrameworkElement_RadioDataItemMapping" TargetType="FrameworkElement">
            <!--
            <Style.Triggers>
                <DataTrigger Binding="{Binding RadioStationName}" Value="Horizon Pulse">
                    <Setter Property="Tag" Value="{StaticResource A_DataItem_HorizonPulse}" />
                </DataTrigger>
                <DataTrigger Binding="{Binding RadioStationName}" Value="Horizon Bass Arena">
                    <Setter Property="Tag" Value="{StaticResource A_DataItem_HorizonBassArena}" />
                </DataTrigger>
                <DataTrigger Binding="{Binding RadioStationName}" Value="Horizon Block Party">
                    <Setter Property="Tag" Value="{StaticResource A_DataItem_HorizonBlockParty}" />
                </DataTrigger>
                <DataTrigger Binding="{Binding RadioStationName}" Value="Timeless FM">
                    <Setter Property="Tag" Value="{StaticResource A_DataItem_TimelessFM}" />
                </DataTrigger>
                <DataTrigger Binding="{Binding RadioStationName}" Value="Vagrant Records">
                    <Setter Property="Tag" Value="{StaticResource A_DataItem_Vagrant}" />
                </DataTrigger>
                <DataTrigger Binding="{Binding RadioStationName}" Value="Epitaph Records">
                    <Setter Property="Tag" Value="{StaticResource A_DataItem_Epitaph}" />
                </DataTrigger>
                <DataTrigger Binding="{Binding RadioStationName}" Value="Hospital Records">
                    <Setter Property="Tag" Value="{StaticResource A_DataItem_Hospital}" />
                </DataTrigger>
                <DataTrigger Binding="{Binding RadioStationName}" Value="Future Classic">
                    <Setter Property="Tag" Value="{StaticResource A_DataItem_FutureClassics}" />
                </DataTrigger>
                <DataTrigger Binding="{Binding RadioStationName}" Value="Xbox Music">
                    <Setter Property="Tag" Value="{StaticResource A_DataItem_Groove}" />
                </DataTrigger>
            </Style.Triggers>
            -->
        </Style>

        <System:String x:Key="PART_String_AllowedRadioStations">Horizon Pulse,Horizon Bass Arena,Future Classic,Horizon Block Party,Vagrant Records,Hospital Records,Epitaph Records,Timeless FM</System:String>
        <System:String x:Key="PART_String_IEAllowedRadioStations">Horizon Pulse,Horizon Bass Arena,Horizon Block Party,Vagrant Records</System:String>
        
        <System:Double x:Key="A_Double_RadioStationTile_Width">504</System:Double>
        <System:Double x:Key="A_Double_RadioStationTile_Height">183</System:Double>

        <Thickness x:Key="A_Thickness_RadioStationTile_Margin">5</Thickness>

        <local:LinearTransformConverter x:Key="A_LinearTransformConverter_Half"
                                        Scale="0.5" />

        <CornerRadius x:Key="A_CornerRadius_RadioStationTile">9,9,9,9</CornerRadius>

        <local:FZMaterialPresetAcrylicPanel x:Key="A_FZMaterialPresetAcrylicPanel_RadioStationTile_Empty"
                                            CornerRadius="{StaticResource A_CornerRadius_RadioStationTile}"
                                            BasedOn="{StaticResource A_FZMaterialPresetAcrylicPanel_EmptyItem}" />

        <local:FZMaterialPresetAcrylicPanel x:Key="A_FZMaterialPresetAcrylicPanel_RadioStationTile_Background"
                                            CornerRadius="{StaticResource A_CornerRadius_RadioStationTile}"
                                            BasedOn="{StaticResource A_FZMaterialPresetAcrylicPanel_Opaque}" />

        <local:FZMaterialPresetAcrylicPanel x:Key="A_FZMaterialPresetAcrylicPanel_RadioStationTile_Background_Selected"
                                            Depth="0"
                                            BasedOn="{StaticResource A_FZMaterialPresetAcrylicPanel_RadioStationTile_Background}" />

        <Style x:Key="A_Style_FZMaterial_AcrylicPanel_RadioStationTile_Background"
               TargetType="local:FZMaterial">
            <Setter Property="Preset"
                    Value="{StaticResource A_FZMaterialPresetAcrylicPanel_RadioStationTile_Background}" />
            <Setter Property="Color"
                    Value="{StaticResource A_Color_Acrylic_Tile_Background}" />
            <Setter Property="DataContext" Value="{Binding Tag, RelativeSource={RelativeSource AncestorType=ListBoxItem}}" />
            <Style.Triggers>
                <DataTrigger Binding="{Binding (Selector.IsSelected), RelativeSource={RelativeSource FindAncestor, AncestorType=ListBoxItem}}"
                             Value="True">
                    <Setter Property="Preset"
                            Value="{StaticResource A_FZMaterialPresetAcrylicPanel_RadioStationTile_Background_Selected}" />
                </DataTrigger>
            </Style.Triggers>
        </Style>

        <Style x:Key="A_Style_FZMaterial_AcrylicPanel_RadioStationTile_Unsigned_Background"
               BasedOn="{StaticResource A_Style_FZMaterial_AcrylicPanel_RadioStationTile_Background}"
               TargetType="local:FZMaterial">
            <Setter Property="ImageSource" Value="{Binding Icon}" />
        </Style>

        <Style x:Key="A_Style_FZMaterial_AcrylicPanel_RadioStationTile_Signed_Background"
               BasedOn="{StaticResource A_Style_FZMaterial_AcrylicPanel_RadioStationTile_Background}"
               TargetType="local:FZMaterial">
            <Setter Property="ImageSource" Value="{Binding SignedBackgroundImage}" />
        </Style>

        <DataTemplate x:Key="A_DataTemplate_RadioStations">
            <Grid x:Name="ItemTemplateRoot">
                <Decorator x:Name="UnsignedContent" Visibility="{Binding IsSigned, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}">
                    <Grid>
                        <local:FZMaterial x:Name="UnsignedItemBackground"
                                    Style="{StaticResource A_Style_FZMaterial_AcrylicPanel_RadioStationTile_Unsigned_Background}" />
                        <local:FZMaterial x:Name="LockIcon"
                                          Height="42" Width="33" 
                                          Color="#AA151515"
                                          ImageSource="/ForzaUI;component/Textures/Anthem/Icons/PauseMenu/Lock_Small.png"
                                          HorizontalAlignment="Right" VerticalAlignment="Bottom"
                                          Margin="23,18"
                                          Visibility="{Binding IsLocked, Converter={StaticResource A_FZBooleanToVisibilityConverter}}" />
                    </Grid>
                </Decorator>
                <Decorator x:Name="SignedContent" Visibility="{Binding IsSigned, Converter={StaticResource A_FZBooleanToVisibilityConverter}}">
                    <local:FZMaterial x:Name="SignedItemBackground"
                                    Style="{StaticResource A_Style_FZMaterial_AcrylicPanel_RadioStationTile_Signed_Background}">
                        <Grid>
                            <local:FZMaterial Color="#41BC13" Width="129" Height="129" HorizontalAlignment="Left" VerticalAlignment="Top">
                                <local:FZMaterial.Data>
                                    <local:FZGeometry Data="M66,0 129,0 0,129 0,66 z" />
                                </local:FZMaterial.Data>
                            </local:FZMaterial>
                            <Decorator Height="98" Width="98" HorizontalAlignment="Left" VerticalAlignment="Top" RenderTransformOrigin="0.5,0.5">
                                <Decorator.RenderTransform>
                                    <RotateTransform Angle="-45" />
                                </Decorator.RenderTransform>
                                <local:FZTextBlock Text="{local:Loc MyProfile.IDS_RadioStation_Signed}" Style="{StaticResource A_Style_FZTextBlock_HorizonA}"
                                                Color="#FFFFFF" FontSize="26" Width="110"
                                                VerticalAlignment="Center" HorizontalAlignment="Center" TextAlignment="Center" />
                            </Decorator>
                        </Grid>
                    </local:FZMaterial>
                </Decorator>
            </Grid>
            <DataTemplate.Triggers>
                <DataTrigger Binding="{Binding IsLocked}" Value="True">
                    <Setter TargetName="UnsignedItemBackground" Property="Color" Value="#66FFFFFF" />
                </DataTrigger>
            </DataTemplate.Triggers>
        </DataTemplate>

        <local:FZMaterialPresetAcrylicPanel x:Key="A_FZMaterialPresetAcrylicPanel_RadioStationTile_Highlight"
                                            CornerRadius="14"
                                            BasedOn="{StaticResource A_FZMaterialPresetAcrylicPanel_BodyPanel_Highlight}" />
        <Style x:Key="A_Style_FZMaterial_AcrylicPanel_RadioStationTile_Highlight"
               TargetType="local:FZMaterial">
            <Setter Property="Preset"
                    Value="{StaticResource A_FZMaterialPresetAcrylicPanel_RadioStationTile_Highlight}" />
            <Setter Property="Color"
                    Value="Transparent" />
        </Style>

        <Style x:Key="A_Style_FZMaterial_Shadow"
               TargetType="{x:Type local:FZMaterial}">
            <Setter Property="RenderTransformOrigin"
                    Value="0.5,0.5" />
            <Setter Property="Preset">
                <Setter.Value>
                    <local:FZMaterialPresetSelfShadow Softness="10"
                                                      CornerRadius="18" />
                </Setter.Value>
            </Setter>
            <Setter Property="Margin"
                    Value="-22,-10,-10,-10" />
            <Setter Property="Color"
                    Value="{StaticResource A_Color_UISelfShadow}" />
        </Style>

        <local:UIStoryboard x:Key="PART_UnlockItemStory"
                            FillBehavior="Stop">

            <Int32AnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.ZIndex)">
                <DiscreteInt32KeyFrame KeyTime="0:0:0"
                                         Value="3" />
            </Int32AnimationUsingKeyFrames>

            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Angle"
                                           Storyboard.TargetName="PanelRotation3D">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                        Value="0" />
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.16"
                                        Value="0" />
                <EasingDoubleKeyFrame KeyTime="0:0:0.4"
                                      Value="-90">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <CubicEase EasingMode="EaseIn" />
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.4"
                                        Value="90" />
                <EasingDoubleKeyFrame KeyTime="0:0:0.66"
                                      Value="0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <CubicEase EasingMode="EaseOut" />
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="OffsetZ"
                                           Storyboard.TargetName="PanelTranslation3D">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                        Value="0" />
                <EasingDoubleKeyFrame KeyTime="0:0:0.16"
                                      Value="-120">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <CubicEase EasingMode="EaseInOut" />
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
                <DiscreteDoubleKeyFrame KeyTime="0:0:1.0"
                                        Value="-120" />
                <EasingDoubleKeyFrame KeyTime="0:0:1.23"
                                      Value="0"><!-- check this looks okay -->
                    <EasingDoubleKeyFrame.EasingFunction>
                        <CubicEase EasingMode="EaseIn" />
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
                <DiscreteDoubleKeyFrame KeyTime="0:0:2.5"
                                        Value="0" />
                <EasingDoubleKeyFrame KeyTime="0:0:2.86"
                                      Value="0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <CircleEase />
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                           Storyboard.TargetName="LargeGlow">
                <LinearDoubleKeyFrame KeyTime="0:0:1.2"
                                      Value="0" />
                <LinearDoubleKeyFrame KeyTime="0:0:1.26"
                                      Value="1.5" />
                <LinearDoubleKeyFrame KeyTime="0:0:1.6"
                                      Value="1.5" />
                <LinearDoubleKeyFrame KeyTime="0:0:2.0"
                                      Value="0" />
            </DoubleAnimationUsingKeyFrames>

            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)"
                                           Storyboard.TargetName="LargeGlow">
                <LinearDoubleKeyFrame KeyTime="0:0:1.2"
                                      Value="0" />
                <EasingDoubleKeyFrame KeyTime="0:0:1.26"
                                      Value="9" />
                <EasingDoubleKeyFrame KeyTime="0:0:2.0"
                                      Value="16">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <CubicEase EasingMode="EaseOut" />
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"
                                           Storyboard.TargetName="LargeGlow">
                <LinearDoubleKeyFrame KeyTime="0:0:1.2"
                                      Value="0" />
                <EasingDoubleKeyFrame KeyTime="0:0:1.26"
                                      Value="9" />
                <EasingDoubleKeyFrame KeyTime="0:0:2.0"
                                      Value="16">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <CubicEase EasingMode="EaseOut" />
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>

            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                           Storyboard.TargetName="ItemGlow">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                        Value="0" />
                <DiscreteDoubleKeyFrame KeyTime="0:0:1.23"
                                        Value="1.0" />
                <LinearDoubleKeyFrame KeyTime="0:0:1.73"
                                      Value="1.0" />
                <LinearDoubleKeyFrame KeyTime="0:0:2.290"
                                      Value="0" />
            </DoubleAnimationUsingKeyFrames>

            <StringAnimationUsingKeyFrames Storyboard.TargetProperty="(local:EventFire.EventName)"
                                           Storyboard.TargetName="EventFire">
                <DiscreteStringKeyFrame KeyTime="0:0:0"
                                        Value="" />
                <DiscreteStringKeyFrame KeyTime="0:0:0.4"
                                        Value="Flipped" />
                <DiscreteStringKeyFrame KeyTime="0:0:2.1"
                                        Value="UnlockComplete" />
                <DiscreteStringKeyFrame KeyTime="0:0:2.2"
                                        Value="" />
            </StringAnimationUsingKeyFrames>
            
            <StringAnimationUsingKeyFrames Storyboard.TargetProperty="(local:AudioEvent.SoundName)"
                                           Storyboard.TargetName="PurchaseAudioEvent">
                <DiscreteStringKeyFrame KeyTime="0:0:0.0"
                                        Value="" />
                <DiscreteStringKeyFrame KeyTime="0:0:0.5"
                                        Value="/Master/UI/Perks/HZ2_SFX_HUD_Perks_Activate_01" />
            </StringAnimationUsingKeyFrames>
        </local:UIStoryboard>
        
        <Style x:Key="A_Style_ListBoxItem_RadioStation"
               TargetType="{x:Type ListBoxItem}"
               BasedOn="{StaticResource A_Style_FrameworkElement_RadioDataItemMapping}">
            <Style.Resources>
                <Storyboard x:Key="PART_ANIMATION_On" />
            </Style.Resources>
            <Setter Property="Margin"
                    Value="{StaticResource A_Thickness_RadioStationTile_Margin}" />
            <Setter Property="Width"
                    Value="{StaticResource A_Double_RadioStationTile_Width}" />
            <Setter Property="Height"
                    Value="{StaticResource A_Double_RadioStationTile_Height}" />
            <Setter Property="FocusVisualStyle"
                    Value="{x:Null}" />
            <Setter Property="Panel.ZIndex"
                    Value="0" />
            <Setter Property="local:TileMenuNavigationManager.GridWidth"
                    Value="1" />
            <Setter Property="local:TileMenuNavigationManager.GridHeight"
                    Value="1" />
            <Setter Property="local:TileMenuNavigationManager.GridX"
                    Value="{Binding GridX}" />
            <Setter Property="local:TileMenuNavigationManager.GridY"
                    Value="{Binding GridY}" />
            <Setter Property="local:TileMenuNavigationManager.TileState"
                    Value="{x:Static local:TileState.Enabled}" />
            <Setter Property="Focusable" Value="True" />
            <Setter Property="local:FocusOnMouseOverBehaviour.Self"
                    Value="True" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ListBoxItem}">
                        <ControlTemplate.Resources>

                            <!-- Duration should be A_Duration_Button_Select -->
                            <local:UIStoryboard x:Key="SelectItemStory">
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"
                                                               Storyboard.TargetName="Grid_Container">
                                    <EasingDoubleKeyFrame KeyTime="0:0:0"
                                                          Value="1.06">
                                        <EasingDoubleKeyFrame.EasingFunction>
                                            <CircleEase />
                                        </EasingDoubleKeyFrame.EasingFunction>
                                    </EasingDoubleKeyFrame>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)"
                                                               Storyboard.TargetName="Grid_Container">
                                    <EasingDoubleKeyFrame KeyTime="0:0:0"
                                                          Value="1.06">
                                        <EasingDoubleKeyFrame.EasingFunction>
                                            <CircleEase />
                                        </EasingDoubleKeyFrame.EasingFunction>
                                    </EasingDoubleKeyFrame>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                               Storyboard.TargetName="ItemHighlight">
                                    <LinearDoubleKeyFrame KeyTime="0:0:0"
                                                          Value="1" />
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                               Storyboard.TargetName="ItemSoftShadow">
                                    <EasingDoubleKeyFrame KeyTime="0:0:0"
                                                          Value="0.6">
                                        <EasingDoubleKeyFrame.EasingFunction>
                                            <CircleEase />
                                        </EasingDoubleKeyFrame.EasingFunction>
                                    </EasingDoubleKeyFrame>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"
                                                               Storyboard.TargetName="ItemSoftShadow">
                                    <EasingDoubleKeyFrame KeyTime="0:0:0"
                                                          Value="1.15">
                                        <EasingDoubleKeyFrame.EasingFunction>
                                            <CircleEase />
                                        </EasingDoubleKeyFrame.EasingFunction>
                                    </EasingDoubleKeyFrame>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)"
                                                               Storyboard.TargetName="ItemSoftShadow">
                                    <EasingDoubleKeyFrame KeyTime="0:0:0"
                                                          Value="1.25">
                                        <EasingDoubleKeyFrame.EasingFunction>
                                            <CircleEase />
                                        </EasingDoubleKeyFrame.EasingFunction>
                                    </EasingDoubleKeyFrame>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="OffsetZ"
                                                               Storyboard.TargetName="SelectionTranslation3D">
                                    <EasingDoubleKeyFrame KeyTime="0:0:0"
                                                          Value="-60">
                                        <EasingDoubleKeyFrame.EasingFunction>
                                            <CircleEase />
                                        </EasingDoubleKeyFrame.EasingFunction>
                                    </EasingDoubleKeyFrame>
                                </DoubleAnimationUsingKeyFrames>
                            </local:UIStoryboard>

                            <local:UIStoryboard x:Key="DeselectItemStory"
                                                DurationOverride="0:0:0.36">
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"
                                                               Storyboard.TargetName="Grid_Container">
                                    <EasingDoubleKeyFrame KeyTime="0:0:1"
                                                          Value="1.0">
                                        <EasingDoubleKeyFrame.EasingFunction>
                                            <CircleEase />
                                        </EasingDoubleKeyFrame.EasingFunction>
                                    </EasingDoubleKeyFrame>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)"
                                                               Storyboard.TargetName="Grid_Container">
                                    <EasingDoubleKeyFrame KeyTime="0:0:1"
                                                          Value="1.0">
                                        <EasingDoubleKeyFrame.EasingFunction>
                                            <CircleEase />
                                        </EasingDoubleKeyFrame.EasingFunction>
                                    </EasingDoubleKeyFrame>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                               Storyboard.TargetName="ItemHighlight">
                                    <EasingDoubleKeyFrame KeyTime="0:0:0"
                                                          Value="0" />
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="OffsetZ"
                                                               Storyboard.TargetName="SelectionTranslation3D">
                                    <EasingDoubleKeyFrame KeyTime="0:0:1"
                                                          Value="0">
                                        <EasingDoubleKeyFrame.EasingFunction>
                                            <CircleEase />
                                        </EasingDoubleKeyFrame.EasingFunction>
                                    </EasingDoubleKeyFrame>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                               Storyboard.TargetName="ItemSoftShadow">
                                    <EasingDoubleKeyFrame KeyTime="0:0:1"
                                                          Value="0">
                                        <EasingDoubleKeyFrame.EasingFunction>
                                            <CircleEase />
                                        </EasingDoubleKeyFrame.EasingFunction>
                                    </EasingDoubleKeyFrame>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"
                                                               Storyboard.TargetName="ItemSoftShadow">
                                    <EasingDoubleKeyFrame KeyTime="0:0:1"
                                                          Value="1">
                                        <EasingDoubleKeyFrame.EasingFunction>
                                            <CircleEase />
                                        </EasingDoubleKeyFrame.EasingFunction>
                                    </EasingDoubleKeyFrame>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)"
                                                               Storyboard.TargetName="ItemSoftShadow">
                                    <EasingDoubleKeyFrame KeyTime="0:0:1"
                                                          Value="1">
                                        <EasingDoubleKeyFrame.EasingFunction>
                                            <CircleEase />
                                        </EasingDoubleKeyFrame.EasingFunction>
                                    </EasingDoubleKeyFrame>
                                </DoubleAnimationUsingKeyFrames>
                            </local:UIStoryboard>

                        </ControlTemplate.Resources>

                        <Grid>
                            <local:FZMaterial x:Name="ItemSoftShadow"
                                              Style="{StaticResource A_Style_FZMaterial_Shadow}"
                                              Color="{StaticResource A_Color_DropShadow}"
                                              Margin="0"
                                              Opacity="0"
                                              RenderTransformOrigin="0.5,0.5"
                                              IsHitTestVisible="False">
                                <local:FZMaterial.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform />
                                        <SkewTransform />
                                        <RotateTransform />
                                        <TranslateTransform />
                                    </TransformGroup>
                                </local:FZMaterial.RenderTransform>
                            </local:FZMaterial>

                            <Grid x:Name="Grid_Container"
                                  RenderTransformOrigin="0.5,0.5"
                                  local:ZPanel.ZOffset="0.0">
                                <Grid.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform />
                                        <SkewTransform />
                                        <RotateTransform />
                                        <TranslateTransform />
                                    </TransformGroup>
                                </Grid.RenderTransform>
                                <local:ZPanel.Transform>
                                    <Transform3DGroup>
                                        <RotateTransform3D CenterY="{Binding Source={StaticResource A_Double_RadioStationTile_Height}, Converter={StaticResource A_LinearTransformConverter_Half}, Mode=OneWay}"
                                                           CenterZ="{Binding Source={StaticResource A_Double_Depth_Acrylic}, Converter={StaticResource A_LinearTransformConverter_Half}, Mode=OneWay}">
                                            <RotateTransform3D.Rotation>
                                                <AxisAngleRotation3D x:Name="PanelRotation3D"
                                                                     Axis="1,0,0"
                                                                     Angle="0" />
                                            </RotateTransform3D.Rotation>
                                        </RotateTransform3D>
                                        <TranslateTransform3D x:Name="PanelTranslation3D"
                                                              OffsetZ="0" />
                                        <TranslateTransform3D x:Name="SelectionTranslation3D"
                                                              OffsetZ="0" />
                                    </Transform3DGroup>
                                </local:ZPanel.Transform>

                                <Grid x:Name="ItemHighlightContainer">
                                    <local:FZMaterial x:Name="ItemHighlight"
                                                      Style="{StaticResource A_Style_FZMaterial_AcrylicPanel_RadioStationTile_Highlight}"
                                                      Opacity="0"
                                                      Margin="-6" />
                                </Grid>

                                <ContentPresenter x:Name="Presenter" />

                                <local:RoutedEventCommand x:Name="SelectCommand"
                                                          RoutedEvent="UIElement.MouseLeftButtonUp"
                                                          Command="{Binding SelectCommand, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" />

                                <local:FZMaterial x:Name="HitTestMaterial"
                                                  local:RoutedEventCommand.Action="{Binding ElementName=SelectCommand}"
                                                  Opacity="0" />

                                <local:FZMaterial x:Name="ItemGlow"
                                              RenderTransformOrigin="0.5, 0.5"
                                              ImageSource="/ForzaUI;component/Textures/Anthem/Highlights/Lineup_Glow.png"
                                              Opacity="0"
                                              Color="#F3FFFFFF"
                                              IsHitTestVisible="False"
                                              Preset="{StaticResource A_FZMaterialPresetAdditive}">
                                    <local:FZMaterial.RenderTransform>
                                        <TransformGroup>
                                            <ScaleTransform ScaleX="1.25"
                                                            ScaleY="2.0" />
                                            <SkewTransform />
                                            <RotateTransform />
                                            <TranslateTransform />
                                        </TransformGroup>
                                    </local:FZMaterial.RenderTransform>
                                </local:FZMaterial>
                            </Grid>

                            <local:FZMaterial x:Name="LargeGlow"
                                              RenderTransformOrigin="0.5, 0.5"
                                              Opacity="0"
                                              Color="#9AFFFFFF"
                                              Preset="{StaticResource A_FZMaterialPresetAdditive}"
                                              ImageSource="/ForzaUI;component/Textures/Anthem/HUD/SkillsLargeGlow.png"
                                              local:ZPanel.DisableClipping="True"
                                              IsHitTestVisible="False">
                                <local:FZMaterial.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="0"
                                                        ScaleY="0" />
                                        <SkewTransform />
                                        <RotateTransform />
                                        <TranslateTransform />
                                    </TransformGroup>
                                </local:FZMaterial.RenderTransform>
                            </local:FZMaterial>

                            <local:AudioEvent x:Name="PurchaseAudioEvent" />
                            <local:EventFire x:Name="EventFire" />
                        </Grid>

                        <ControlTemplate.Triggers>
                            <DataTrigger Binding="{Binding (Selector.IsSelected), RelativeSource={RelativeSource Self}}"
                                         Value="True">
                                <DataTrigger.ExitActions>
                                    <BeginStoryboard x:Name="HideSelected_BeginStoryboard"
                                                     HandoffBehavior="SnapshotAndReplace"
                                                     Storyboard="{StaticResource DeselectItemStory}" />
                                </DataTrigger.ExitActions>
                                <DataTrigger.EnterActions>
                                    <BeginStoryboard x:Name="ShowSelected_BeginStoryboard"
                                                     HandoffBehavior="SnapshotAndReplace"
                                                     Storyboard="{StaticResource SelectItemStory}" />
                                </DataTrigger.EnterActions>
                            </DataTrigger>
                            <DataTrigger Binding="{Binding IsLocked}" Value="True">
                                <Setter TargetName="HitTestMaterial" Property="IsHitTestVisible" Value="False" />
                            </DataTrigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Style.Triggers>
                <DataTrigger Binding="{Binding IsLocked}" Value="True">
                    <Setter Property="local:TileMenuNavigationManager.LockState" Value="{x:Static local:LockState.Locked}" />
                </DataTrigger>
                <Trigger Property="Selector.IsSelected"
                         Value="True">
                    <Setter Property="Panel.ZIndex"
                            Value="3" />
                </Trigger>
                <Trigger Property="IsMouseOver" Value="True">
                    <Trigger.EnterActions>
                        <local:CommandAction CommandPropertyName="HighlightTile"
                                             AncestorType="Page" />
                    </Trigger.EnterActions>
                </Trigger>
                <Trigger Property="IsKeyboardFocused"
                                     Value="True">
                    <Setter Property="Selector.IsSelected"
                                        Value="True" />
                </Trigger>
                <DataTrigger Binding="{Binding IsEmpty}" Value="True">
                    <Setter Property="Focusable" Value="False" />
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="{x:Type ListBoxItem}">
                                <local:FZMaterial x:Name="EmptyItem" 
                                                  Style="{StaticResource A_Style_FZMaterial_AcrylicPanel_EmptyItem}"
                                                  Preset="{StaticResource A_FZMaterialPresetAcrylicPanel_RadioStationTile_Empty}" />
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </DataTrigger>
            </Style.Triggers>
        </Style>

        <Style x:Key="A_Style_ListBox_RadioStation"
               TargetType="{x:Type local:CommonListBox}">
            <Setter Property="ItemContainerStyle"
                    Value="{StaticResource A_Style_ListBoxItem_RadioStation}" />
            <Setter Property="ItemTemplate"
                    Value="{StaticResource A_DataTemplate_RadioStations}" />
            <Setter Property="KeyboardNavigation.DirectionalNavigation"
                    Value="Contained" />
            <Setter Property="Focusable"
                    Value="False" />
            <Setter Property="Margin"
                    Value="-5" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type local:CommonListBox}">
                        <Decorator x:Name="PART_MenuContent">
                            <WrapPanel Orientation="Horizontal"
                                       IsItemsHost="True" />
                        </Decorator>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style TargetType="local:FZTextBlock" x:Key="A_Style_FZTextBlock_DescriptionBlockText"
               BasedOn="{StaticResource A_Style_FZTextBlock_DescriptionBlockBody}">
            <Setter Property="VerticalAlignment"
                    Value="Center" />
            <Setter Property="TextWrapping"
                    Value="WrapWithOverflow" />
            <Setter Property="Stretch"
                    Value="Uniform" />
            <Setter Property="Margin"
                    Value="28,10" />
        </Style>

        <Style TargetType="local:FZRun" x:Key="A_Style_FZRun_DescriptionText_Large">
            <Setter Property="FontFamily" Value="Horizon_A" />
            <Setter Property="FontSize" Value="32" />
        </Style>
        
    </Page.Resources>
    <local:UIPageTransitionManager.TransitionManager>
        <local:UIPageTransitionManager Preset="{StaticResource A_UIPageTransitionManagerPreset_Menu}"/>
    </local:UIPageTransitionManager.TransitionManager>

    <Grid x:Name="LayoutRoot">

       <Control Style="{StaticResource A_Style_Control_ScreenBackground}" />

        <!-- Help Panel -->
        <ContentControl Style="{StaticResource A_Style_ButtonBar}"
                        x:Name="BottomBar" Panel.ZIndex="10">
            <ContentControl Style="{StaticResource A_Style_ContentControl_DefaultButtonBar}"
                            local:ControllerButtonPanel.ADescription="{local:Loc HelpButtons.IDS_SignRadioStation}"
                            local:ControllerButtonPanel.BDescription="{local:Loc HelpButtons.IDS_Back}"
                            x:Name="DefaultHelpPanel" />
        </ContentControl>

        <Border Style="{StaticResource A_Style_Border_ScenePadding}">
            <StackPanel Orientation="Vertical"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Width="1532">
                <Decorator Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_0}">
                    <ContentControl Style="{StaticResource A_Style_ContentControl_ScreenTitleBlock}"
                                Content="{local:Loc ScreenTitles.IDS_UnlockRadioStation}"
                                local:BindingProxy.A="/ForzaUI;component/Textures/Anthem/Icons/Titles/Radio.png"
                                HorizontalAlignment="Left" />
                </Decorator>

                <Decorator Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_1}"
                           Panel.ZIndex="10">
                    <local:CommonListBox ItemsSource="{Binding RadioStations}"
                                    SelectedItem="{Binding SelectedRadioStation, Mode=OneWayToSource}"
                                    Style="{StaticResource A_Style_ListBox_RadioStation}"
                                    x:Name="PART_ListBox_Menu" />
                </Decorator>

                <Decorator Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_2}" 
                           DataContext="{Binding SelectedItem, ElementName=PART_ListBox_Menu}"                           
                           Margin="0,10,0,0">
                    <Decorator x:Name="DataItemMapper"
                               Style="{StaticResource A_Style_FrameworkElement_RadioDataItemMapping}">
                        <Decorator DataContext="{Binding Tag, ElementName=DataItemMapper}"
                                Height="71">
                            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_AcrylicPanel_BodyPanel}">
                                <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_DescriptionBlockText}"
                                           Text="{Binding Description}"
                                           HorizontalAlignment="Center"/>
                            </local:FZMaterial>
                        </Decorator>
                    </Decorator>
                </Decorator>
            </StackPanel>
        </Border>
    </Grid>
</Page>
