<Page x:Name="Page"
      x:Class="ForzaUI.Scenes.Anthem.A_AutovistaHome"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:System="clr-namespace:System;assembly=mscorlib"
      xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing"
      xmlns:local="clr-namespace:ForzaUI"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      xmlns:ForzaUI_Controls="clr-namespace:ForzaUI.Controls"
      mc:Ignorable="d"
      Style="{StaticResource A_Style_Page_Generic}"
      DataContext="{Binding RelativeSource={x:Static RelativeSource.Self}}">

    <Page.Resources>
        <ResourceDictionary>
            <Color x:Key="AlmostWhiteColor">#FFFAFAFA</Color>
            <Color x:Key="MidGrayColor">#FF878787</Color>
            <Color x:Key="DarkGray80Color">#FF595959</Color>
            <Color x:Key="DefaultTeardropGlassColor">#40B3B3B3</Color>
            <Color x:Key="DefaultPinGlassColor">#20FFFFFF</Color>
            <Color x:Key="RedPinColor">#FFFF0088</Color>
            <Color x:Key="RedPinGlassColor">#FF262626</Color>
            <Color x:Key="GreenPinColor">#FFCAFF02</Color>
            <Color x:Key="GreenPinGlassColor">#FF262626</Color>

            <SolidColorBrush x:Key="DarkGray80Brush" Color="{StaticResource DarkGray80Color}"/>
            <SolidColorBrush x:Key="GreenPinBrush" Color="{StaticResource GreenPinColor}"/>

            <KeyTime x:Key="BeginTransitionKeyTime">0:0:0.0001</KeyTime>

            <!--Temporary, awaiting asset.-->

<!-- check the naming -->
            <System:Double x:Key="LegacyAutovistaPinImageSize">80</System:Double>
            <System:Double x:Key="AutovistaPinImageSize">108</System:Double>
            <System:Double x:Key="AutovistaPinTypeItemSize">30</System:Double>
            <System:Double x:Key="AutovistaPinTypeImageSize">15</System:Double>
            <System:Double x:Key="AutovistaPinTypeEllipseBorderSize">27</System:Double>
            <System:Double x:Key="AutovistaPinTypeEllipseSize">25</System:Double>

            <Style x:Key="ProgressArcStyle" TargetType="{x:Type ed:Arc}">
                <Setter Property="Margin" Value="0"/>
                <Setter Property="Stretch" Value="None"/>
                <Setter Property="HorizontalAlignment" Value="Stretch"/>
                <Setter Property="VerticalAlignment" Value="Stretch"/>
            </Style>

            <Style x:Key="AutovistaPinListBoxItemStyle" TargetType="{x:Type ListBoxItem}">
                <Setter Property="Background" Value="Transparent"/>
                <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
                <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
                <Setter Property="SnapsToDevicePixels" Value="False"/>
                <Setter Property="Padding" Value="0,0,0,0"/>
                <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type ListBoxItem}">
                            <Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Background="{TemplateBinding Background}">
                                <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                        <VisualState x:Name="PART_Normal"/>
                                        <VisualState x:Name="PART_MouseOver"/>
                                        <VisualState x:Name="PART_Disabled"/>
                                    </VisualStateGroup>
                                </VisualStateManager.VisualStateGroups>
                                <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                            </Border>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>

            <Style x:Key="AutovistaPinListBoxStyle" TargetType="{x:Type ListBox}">
                <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type ListBox}">
                            <Border Background="{x:Null}">
                                <ScrollViewer Focusable="false" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Disabled">
                                    <Canvas IsItemsHost="true"/>
                                </ScrollViewer>
                            </Border>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>

            <ControlTemplate x:Key="AutovistaPinIconControlTemplate" TargetType="Control">
                <ControlTemplate.Resources>
                    <Style x:Key="Style_Image_Icon" TargetType="{x:Type Image}">
                        <Setter Property="Height" Value="{StaticResource AutovistaPinImageSize}"/>
                        <Setter Property="HorizontalAlignment" Value="Center"/>
                        <Setter Property="RenderTransform">
                            <Setter.Value>
                                <TransformGroup>
                                    <RotateTransform/>
                                    <ScaleTransform/>
                                    <SkewTransform/>
                                    <TranslateTransform/>
                                </TransformGroup>
                            </Setter.Value>
                        </Setter>
                        <Setter Property="VerticalAlignment" Value="Center"/>
                        <Setter Property="Width" Value="{StaticResource AutovistaPinImageSize}"/>
                    </Style>

                    <Storyboard x:Key="Storyboard_AnimatedIconDown" RepeatBehavior="Forever">
                        <DoubleAnimationUsingKeyFrames  Storyboard.TargetName="Image_AnimatedIcon" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
                            <DiscreteDoubleKeyFrame KeyTime="0" Value="-2.5"/>
                            <EasingDoubleKeyFrame KeyTime="0:0:0.630" Value="0"/>
                            <EasingDoubleKeyFrame KeyTime="0:0:1.260" Value="-2.5"/>
                        </DoubleAnimationUsingKeyFrames>
                    </Storyboard>

                    <Storyboard x:Key="Storyboard_AnimatedIconLeft" RepeatBehavior="Forever">
                        <DoubleAnimationUsingKeyFrames  Storyboard.TargetName="Image_AnimatedIcon" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
                            <DiscreteDoubleKeyFrame KeyTime="0" Value="2.5"/>
                            <EasingDoubleKeyFrame KeyTime="0:0:0.630" Value="0"/>
                            <EasingDoubleKeyFrame KeyTime="0:0:1.260" Value="2.5"/>
                        </DoubleAnimationUsingKeyFrames>
                    </Storyboard>

                    <Storyboard x:Key="Storyboard_AnimatedIconRight" RepeatBehavior="Forever">
                        <DoubleAnimationUsingKeyFrames  Storyboard.TargetName="Image_AnimatedIcon" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
                            <DiscreteDoubleKeyFrame KeyTime="0" Value="-2.5"/>
                            <EasingDoubleKeyFrame KeyTime="0:0:0.630" Value="0"/>
                            <EasingDoubleKeyFrame KeyTime="0:0:1.260" Value="-2.5"/>
                        </DoubleAnimationUsingKeyFrames>
                    </Storyboard>

                    <Storyboard x:Key="Storyboard_AnimatedIconUp" RepeatBehavior="Forever">
                        <DoubleAnimationUsingKeyFrames  Storyboard.TargetName="Image_AnimatedIcon" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
                            <DiscreteDoubleKeyFrame KeyTime="0" Value="2.5"/>
                            <EasingDoubleKeyFrame KeyTime="0:0:0.630" Value="0"/>
                            <EasingDoubleKeyFrame KeyTime="0:0:1.260" Value="2.5"/>
                        </DoubleAnimationUsingKeyFrames>
                    </Storyboard>
                </ControlTemplate.Resources>

                <Grid>
                    <Image x:Name="Image_StaticIcon" Style="{StaticResource Style_Image_Icon}"/>
                    <Image x:Name="Image_AnimatedIcon" Style="{StaticResource Style_Image_Icon}" Visibility="Collapsed"/>
                </Grid>

                <ControlTemplate.Triggers>
                    <DataTrigger Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.None}">
                        <Setter TargetName="Image_StaticIcon" Property="Source" Value="{Binding IconName}"/>
                        <Setter TargetName="Image_StaticIcon" Property="Height" Value="Nan"/>
                        <Setter TargetName="Image_StaticIcon" Property="Width" Value="Nan"/>
                        <Setter TargetName="Image_StaticIcon" Property="MaxHeight" Value="{StaticResource LegacyAutovistaPinImageSize}"/>
                        <Setter TargetName="Image_StaticIcon" Property="MaxWidth" Value="{StaticResource LegacyAutovistaPinImageSize}"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.CloseDoor}">
                        <Setter TargetName="Image_StaticIcon" Property="Source" Value="/ForzaUI;component/Textures/Data_Bound/Anthem/Autovista_Icons/CloseDoor/Close_Door.png"/>
                        <Setter TargetName="Image_AnimatedIcon" Property="Source" Value="/ForzaUI;component/Textures/Data_Bound/Anthem/Autovista_Icons/CloseDoor/Close_Door_Arrow.png"/>
                        <Setter TargetName="Image_AnimatedIcon" Property="Visibility" Value="Visible"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.CloseHood}">
                        <Setter TargetName="Image_StaticIcon" Property="Source" Value="/ForzaUI;component/Textures/Data_Bound/Anthem/Autovista_Icons/CloseHood/Close_Hood.png"/>
                        <Setter TargetName="Image_AnimatedIcon" Property="Source" Value="/ForzaUI;component/Textures/Data_Bound/Anthem/Autovista_Icons/CloseHood/Close_Hood_Arrow.png"/>
                        <Setter TargetName="Image_AnimatedIcon" Property="Visibility" Value="Visible"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.CloseRoof}">
                        <Setter TargetName="Image_StaticIcon" Property="Source" Value="/ForzaUI;component/Textures/Data_Bound/Anthem/Autovista_Icons/CloseRoof/Close_Roof.png"/>
                        <Setter TargetName="Image_AnimatedIcon" Property="Source" Value="/ForzaUI;component/Textures/Data_Bound/Anthem/Autovista_Icons/CloseRoof/Close_Roof_Arrow.png"/>
                        <Setter TargetName="Image_AnimatedIcon" Property="Visibility" Value="Visible"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.CloseTrunk}">
                        <Setter TargetName="Image_StaticIcon" Property="Source" Value="/ForzaUI;component/Textures/Data_Bound/Anthem/Autovista_Icons/CloseBoot/Close_Boot.png"/>
                        <Setter TargetName="Image_AnimatedIcon" Property="Source" Value="/ForzaUI;component/Textures/Data_Bound/Anthem/Autovista_Icons/CloseBoot/Close_Boot_Arrow.png"/>
                        <Setter TargetName="Image_AnimatedIcon" Property="Visibility" Value="Visible"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.CustomizeBack}">
                        <Setter TargetName="Image_StaticIcon" Property="Source" Value="/ForzaUI;component/Textures/Data_Bound/Anthem/Autovista_Icons/CustomisePart/Customise_Part.png"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.CustomizeFront}">
                        <Setter TargetName="Image_StaticIcon" Property="Source" Value="/ForzaUI;component/Textures/Data_Bound/Anthem/Autovista_Icons/CustomisePart/Customise_Part.png"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.CustomizeHorn}">
                        <Setter TargetName="Image_StaticIcon" Property="Source" Value="/ForzaUI;component/Textures/Data_Bound/Anthem/Autovista_Icons/SoundHorn/Sound_Horn.png"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.CustomizeLicensePlate}">
                        <Setter TargetName="Image_StaticIcon" Property="Source" Value="/ForzaUI;component/Textures/Data_Bound/Anthem/Autovista_Icons/LicensePlate/License_Plate.png"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.CustomizeSide}">
                        <Setter TargetName="Image_StaticIcon" Property="Source" Value="/ForzaUI;component/Textures/Data_Bound/Anthem/Autovista_Icons/CustomisePart/Customise_Part.png"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.CustomizeWheels}">
                        <Setter TargetName="Image_StaticIcon" Property="Source" Value="/ForzaUI;component/Textures/Data_Bound/Anthem/Autovista_Icons/CustomisePart/Customise_Part.png"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.EnterCar}">
                        <Setter TargetName="Image_StaticIcon" Property="Source" Value="/ForzaUI;component/Textures/Data_Bound/Anthem/Autovista_Icons/EnterCar/Enter_Car.png"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.ExitCar}">
                        <Setter TargetName="Image_StaticIcon" Property="Source" Value="/ForzaUI;component/Textures/Data_Bound/Anthem/Autovista_Icons/LeaveCar/Leave_Car.png"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.UpgradePreset}">
                        <Setter TargetName="Image_StaticIcon" Property="Source" Value="/ForzaUI;component/Textures/Data_Bound/Anthem/Autovista_Icons/UpgradePreset/Upgrade_Preset.png"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.LowerWing}">
                        <Setter TargetName="Image_StaticIcon" Property="Source" Value="/ForzaUI;component/Textures/Data_Bound/Anthem/Autovista_Icons/CloseWing/Close_Wing.png"/>
                        <Setter TargetName="Image_AnimatedIcon" Property="Source" Value="/ForzaUI;component/Textures/Data_Bound/Anthem/Autovista_Icons/CloseWing/Close_Wing_Arrow.png"/>
                        <Setter TargetName="Image_AnimatedIcon" Property="Visibility" Value="Visible"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.OpenDoor}">
                        <Setter TargetName="Image_StaticIcon" Property="Source" Value="/ForzaUI;component/Textures/Data_Bound/Anthem/Autovista_Icons/OpenDoor/Open_Door.png"/>
                        <Setter TargetName="Image_AnimatedIcon" Property="Source" Value="/ForzaUI;component/Textures/Data_Bound/Anthem/Autovista_Icons/OpenDoor/Open_Door_Arrow.png"/>
                        <Setter TargetName="Image_AnimatedIcon" Property="Visibility" Value="Visible"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.OpenHood}">
                        <Setter TargetName="Image_StaticIcon" Property="Source" Value="/ForzaUI;component/Textures/Data_Bound/Anthem/Autovista_Icons/OpenHood/Open_Hood.png"/>
                        <Setter TargetName="Image_AnimatedIcon" Property="Source" Value="/ForzaUI;component/Textures/Data_Bound/Anthem/Autovista_Icons/OpenHood/Open_Hood_Arrow.png"/>
                        <Setter TargetName="Image_AnimatedIcon" Property="Visibility" Value="Visible"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.OpenRoof}">
                        <Setter TargetName="Image_StaticIcon" Property="Source" Value="/ForzaUI;component/Textures/Data_Bound/Anthem/Autovista_Icons/OpenRoof/Open_Roof.png"/>
                        <Setter TargetName="Image_AnimatedIcon" Property="Source" Value="/ForzaUI;component/Textures/Data_Bound/Anthem/Autovista_Icons/OpenRoof/Open_Roof_Arrow.png"/>
                        <Setter TargetName="Image_AnimatedIcon" Property="Visibility" Value="Visible"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.OpenTrunk}">
                        <Setter TargetName="Image_StaticIcon" Property="Source" Value="/ForzaUI;component/Textures/Data_Bound/Anthem/Autovista_Icons/OpenBoot/Open_Boot.png"/>
                        <Setter TargetName="Image_AnimatedIcon" Property="Source" Value="/ForzaUI;component/Textures/Data_Bound/Anthem/Autovista_Icons/OpenBoot/Open_Boot_Arrow.png"/>
                        <Setter TargetName="Image_AnimatedIcon" Property="Visibility" Value="Visible"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.PaintOptions}">
                        <Setter TargetName="Image_StaticIcon" Property="Source" Value="/ForzaUI;component/Textures/Data_Bound/Anthem/Autovista_Icons/PaintOptions/Paint_Options.png"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.RaiseWing}">
                        <Setter TargetName="Image_StaticIcon" Property="Source" Value="/ForzaUI;component/Textures/Data_Bound/Anthem/Autovista_Icons/OpenWing/Open_Wing.png"/>
                        <Setter TargetName="Image_AnimatedIcon" Property="Source" Value="/ForzaUI;component/Textures/Data_Bound/Anthem/Autovista_Icons/OpenWing/Open_Wing_Arrow.png"/>
                        <Setter TargetName="Image_AnimatedIcon" Property="Visibility" Value="Visible"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.Rollout}">
                        <Setter TargetName="Image_StaticIcon" Property="Source" Value="/ForzaUI;component/Textures/Data_Bound/Anthem/Autovista_Icons/ExitToFreeroam/Exit_To_Freeroam.png"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.ToggleEngine}">
                        <Setter TargetName="Image_StaticIcon" Property="Source" Value="/ForzaUI;component/Textures/Data_Bound/Anthem/Autovista_Icons/EngineToggle/Engine_Toggle.png"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.ToggleHeadlights}">
                        <Setter TargetName="Image_StaticIcon" Property="Source" Value="/ForzaUI;component/Textures/Data_Bound/Anthem/Autovista_Icons/HeadlightToggle/Headlight_Toggle.png"/>
                    </DataTrigger>

                    <!--Close Door-->
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding Focused}" Value="True"/>
                            <Condition Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.CloseDoor}"/>
                        </MultiDataTrigger.Conditions>

                        <MultiDataTrigger.EnterActions>
                            <BeginStoryboard x:Name="BeginStoryboard_CloseDoor" Storyboard="{StaticResource Storyboard_AnimatedIconLeft}"/>
                        </MultiDataTrigger.EnterActions>
                        <MultiDataTrigger.ExitActions>
                            <StopStoryboard BeginStoryboardName="BeginStoryboard_CloseDoor"/>
                        </MultiDataTrigger.ExitActions>
                    </MultiDataTrigger>

                    <!--Close Hood-->
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding Focused}" Value="True"/>
                            <Condition Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.CloseHood}"/>
                        </MultiDataTrigger.Conditions>

                        <MultiDataTrigger.EnterActions>
                            <BeginStoryboard x:Name="BeginStoryboard_CloseHood" Storyboard="{StaticResource Storyboard_AnimatedIconDown}"/>
                        </MultiDataTrigger.EnterActions>
                        <MultiDataTrigger.ExitActions>
                            <StopStoryboard BeginStoryboardName="BeginStoryboard_CloseHood"/>
                        </MultiDataTrigger.ExitActions>
                    </MultiDataTrigger>

                    <!--Close Roof-->
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding Focused}" Value="True"/>
                            <Condition Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.CloseRoof}"/>
                        </MultiDataTrigger.Conditions>

                        <MultiDataTrigger.EnterActions>
                            <BeginStoryboard x:Name="BeginStoryboard_CloseRoof" Storyboard="{StaticResource Storyboard_AnimatedIconRight}"/>
                        </MultiDataTrigger.EnterActions>
                        <MultiDataTrigger.ExitActions>
                            <StopStoryboard BeginStoryboardName="BeginStoryboard_CloseRoof"/>
                        </MultiDataTrigger.ExitActions>
                    </MultiDataTrigger>

                    <!--Close Trunk-->
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding Focused}" Value="True"/>
                            <Condition Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.CloseTrunk}"/>
                        </MultiDataTrigger.Conditions>

                        <MultiDataTrigger.EnterActions>
                            <BeginStoryboard x:Name="BeginStoryboard_CloseTrunk" Storyboard="{StaticResource Storyboard_AnimatedIconDown}"/>
                        </MultiDataTrigger.EnterActions>
                        <MultiDataTrigger.ExitActions>
                            <StopStoryboard BeginStoryboardName="BeginStoryboard_CloseTrunk"/>
                        </MultiDataTrigger.ExitActions>
                    </MultiDataTrigger>

                    <!--Lower Wing-->
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding Focused}" Value="True"/>
                            <Condition Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.LowerWing}"/>
                        </MultiDataTrigger.Conditions>

                        <MultiDataTrigger.EnterActions>
                            <BeginStoryboard x:Name="BeginStoryboard_CloseWing" Storyboard="{StaticResource Storyboard_AnimatedIconDown}"/>
                        </MultiDataTrigger.EnterActions>
                        <MultiDataTrigger.ExitActions>
                            <StopStoryboard BeginStoryboardName="BeginStoryboard_CloseWing"/>
                        </MultiDataTrigger.ExitActions>
                    </MultiDataTrigger>

                    <!--Open Door-->
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding Focused}" Value="True"/>
                            <Condition Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.OpenDoor}"/>
                        </MultiDataTrigger.Conditions>

                        <MultiDataTrigger.EnterActions>
                            <BeginStoryboard x:Name="BeginStoryboard_OpenDoor" Storyboard="{StaticResource Storyboard_AnimatedIconRight}"/>
                        </MultiDataTrigger.EnterActions>
                        <MultiDataTrigger.ExitActions>
                            <StopStoryboard BeginStoryboardName="BeginStoryboard_OpenDoor"/>
                        </MultiDataTrigger.ExitActions>
                    </MultiDataTrigger>
                
                    <!--Open Hood-->
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding Focused}" Value="True"/>
                            <Condition Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.OpenHood}"/>
                        </MultiDataTrigger.Conditions>

                        <MultiDataTrigger.EnterActions>
                            <BeginStoryboard x:Name="BeginStoryboard_OpenHood" Storyboard="{StaticResource Storyboard_AnimatedIconUp}"/>
                        </MultiDataTrigger.EnterActions>
                        <MultiDataTrigger.ExitActions>
                            <StopStoryboard BeginStoryboardName="BeginStoryboard_OpenHood"/>
                        </MultiDataTrigger.ExitActions>
                    </MultiDataTrigger>

                    <!--Open Roof-->
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding Focused}" Value="True"/>
                            <Condition Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.OpenRoof}"/>
                        </MultiDataTrigger.Conditions>

                        <MultiDataTrigger.EnterActions>
                            <BeginStoryboard x:Name="BeginStoryboard_OpenRoof" Storyboard="{StaticResource Storyboard_AnimatedIconRight}"/>
                        </MultiDataTrigger.EnterActions>
                        <MultiDataTrigger.ExitActions>
                            <StopStoryboard BeginStoryboardName="BeginStoryboard_OpenRoof"/>
                        </MultiDataTrigger.ExitActions>
                    </MultiDataTrigger>

                    <!--Open Trunk-->
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding Focused}" Value="True"/>
                            <Condition Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.OpenTrunk}"/>
                        </MultiDataTrigger.Conditions>

                        <MultiDataTrigger.EnterActions>
                            <BeginStoryboard x:Name="BeginStoryboard_OpenTrunk" Storyboard="{StaticResource Storyboard_AnimatedIconUp}"/>
                        </MultiDataTrigger.EnterActions>
                        <MultiDataTrigger.ExitActions>
                            <StopStoryboard BeginStoryboardName="BeginStoryboard_OpenTrunk"/>
                        </MultiDataTrigger.ExitActions>
                    </MultiDataTrigger>
                    
                    <!--Raise Wing-->
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding Focused}" Value="True"/>
                            <Condition Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.RaiseWing}"/>
                        </MultiDataTrigger.Conditions>

                        <MultiDataTrigger.EnterActions>
                            <BeginStoryboard x:Name="BeginStoryboard_RaiseWing" Storyboard="{StaticResource Storyboard_AnimatedIconUp}"/>
                        </MultiDataTrigger.EnterActions>
                        <MultiDataTrigger.ExitActions>
                            <StopStoryboard BeginStoryboardName="BeginStoryboard_RaiseWing"/>
                        </MultiDataTrigger.ExitActions>
                    </MultiDataTrigger>
                </ControlTemplate.Triggers>
            </ControlTemplate>

            <DataTemplate x:Key="AutovistaPinItemDataTemplate">
                <DataTemplate.Resources>
                    <Style x:Key="Style_FZMaterial_PinEllipseBorder" TargetType="{x:Type local:FZMaterial}">
                        <Setter Property="Color" Value="{StaticResource DefaultPinGlassColor}"/>
                        <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetGlass_Low}"/>
                        <Setter Property="Data">
                            <Setter.Value>
                                <local:FZGeometry>
                                    <local:FZGeometry.Data>
                                        <EllipseGeometry RadiusX="{StaticResource AutovistaPinTypeEllipseBorderSize}"
                                                         RadiusY="{StaticResource AutovistaPinTypeEllipseBorderSize}"/>
                                    </local:FZGeometry.Data>
                                </local:FZGeometry>
                            </Setter.Value>
                        </Setter>
                    </Style>

                    <Style x:Key="Style_FZMaterial_PinEllipseFill" TargetType="{x:Type local:FZMaterial}">
                        <Setter Property="Color" Value="{StaticResource MidGrayColor}"/>
                        <Setter Property="Width" Value="{StaticResource AutovistaPinTypeEllipseSize}"/>
                        <Setter Property="Height" Value="{StaticResource AutovistaPinTypeEllipseSize}"/>
                        <Setter Property="HorizontalAlignment" Value="Center"/>
                        <Setter Property="VerticalAlignment" Value="Center"/>
                        <Setter Property="Data">
                            <Setter.Value>
                                <local:FZGeometry>
                                    <local:FZGeometry.Data>
                                        <EllipseGeometry RadiusX="{StaticResource AutovistaPinTypeEllipseSize}"
                                                         RadiusY="{StaticResource AutovistaPinTypeEllipseSize}"/>
                                    </local:FZGeometry.Data>
                                </local:FZGeometry>
                            </Setter.Value>
                        </Setter>
                    </Style>
                    
                    <Storyboard x:Key="Focused">
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_PinTeardrop"
                                                       Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
                            <DiscreteDoubleKeyFrame KeyTime="0" Value="7"/>
                            <DiscreteDoubleKeyFrame KeyTime="0:0:0.196" Value="7"/>
                            <LinearDoubleKeyFrame KeyTime="0:0:0.467" Value="0"/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="PART_PinTeardrop">
                            <DiscreteDoubleKeyFrame KeyTime="0" Value="0"/>
                            <DiscreteDoubleKeyFrame KeyTime="0:0:0.196" Value="0"/>
                            <LinearDoubleKeyFrame KeyTime="0:0:0.467" Value="1"/>
                        </DoubleAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="PART_PinTeardrop">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
                            <DiscreteObjectKeyFrame KeyTime="0:0:0.196" Value="{x:Static Visibility.Visible}"/>
                        </ObjectAnimationUsingKeyFrames>

                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Grid_PinEllipse"
                                                       Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                            <DiscreteDoubleKeyFrame KeyTime="0" Value="0.9"/>
                            <LinearDoubleKeyFrame KeyTime="0:0:0.467" Value="1.1"/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Grid_PinEllipse"
                                                       Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                            <DiscreteDoubleKeyFrame KeyTime="0" Value="0.9"/>
                            <LinearDoubleKeyFrame KeyTime="0:0:0.467" Value="1.1"/>
                        </DoubleAnimationUsingKeyFrames>

                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Rectangle_PinEllipseIcon"
                                                       Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                            <DiscreteDoubleKeyFrame KeyTime="0" Value="1"/>
                            <LinearDoubleKeyFrame KeyTime="0:0:0.467" Value="1.1"/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Rectangle_PinEllipseIcon"
                                                       Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                            <DiscreteDoubleKeyFrame KeyTime="0" Value="1"/>
                            <LinearDoubleKeyFrame KeyTime="0:0:0.467" Value="1.1"/>
                        </DoubleAnimationUsingKeyFrames>
                    </Storyboard><!-- /Focused -->

                    <Storyboard x:Key="FocusedGreen">
                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="FZMaterial_PinEllipseBorderGreen"
                                                      Storyboard.TargetProperty="(local:FZMaterial.Color)">
                            <DiscreteColorKeyFrame KeyTime="0" Value="{StaticResource DefaultPinGlassColor}"/>
                            <LinearColorKeyFrame KeyTime="0:0:0.196" Value="{StaticResource GreenPinGlassColor}"/>
                        </ColorAnimationUsingKeyFrames>

                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="FZMaterial_PinEllipseFillGreen"
                                                      Storyboard.TargetProperty="(local:FZMaterial.Color)">
                            <DiscreteColorKeyFrame KeyTime="0" Value="{StaticResource MidGrayColor}"/>
                            <LinearColorKeyFrame KeyTime="0:0:0.196" Value="{StaticResource GreenPinColor}"/>
                        </ColorAnimationUsingKeyFrames>
                    </Storyboard>

                    <Storyboard x:Key="FocusedRed">
                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="FZMaterial_PinEllipseBorderRed"
                                                      Storyboard.TargetProperty="(local:FZMaterial.Color)">
                            <DiscreteColorKeyFrame KeyTime="0" Value="{StaticResource DefaultPinGlassColor}"/>
                            <LinearColorKeyFrame KeyTime="0:0:0.196" Value="{StaticResource RedPinGlassColor}"/>
                        </ColorAnimationUsingKeyFrames>

                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="FZMaterial_PinEllipseFillRed"
                                                      Storyboard.TargetProperty="(local:FZMaterial.Color)">
                            <DiscreteColorKeyFrame KeyTime="0" Value="{StaticResource MidGrayColor}"/>
                            <LinearColorKeyFrame KeyTime="0:0:0.196" Value="{StaticResource RedPinColor}"/>
                        </ColorAnimationUsingKeyFrames>
                    </Storyboard>

                    <Storyboard x:Key="UnFocused">
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_PinTeardrop"
                                                       Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
                            <DiscreteDoubleKeyFrame KeyTime="0" Value="0"/>
                            <LinearDoubleKeyFrame KeyTime="0:0:0.334" Value="7"/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="PART_PinTeardrop">
                            <DiscreteDoubleKeyFrame KeyTime="0" Value="1"/>
                            <LinearDoubleKeyFrame KeyTime="0:0:0.334" Value="0"/>
                        </DoubleAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="PART_PinTeardrop">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
                            <DiscreteObjectKeyFrame KeyTime="0:0:0.334" Value="{x:Static Visibility.Hidden}"/>
                        </ObjectAnimationUsingKeyFrames>
                        
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Grid_PinEllipse"
                                                       Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                            <DiscreteDoubleKeyFrame KeyTime="0" Value="1.1"/>
                            <LinearDoubleKeyFrame KeyTime="0:0:0.334" Value="0.9"/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Grid_PinEllipse"
                                                       Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                            <DiscreteDoubleKeyFrame KeyTime="0" Value="1.1"/>
                            <LinearDoubleKeyFrame KeyTime="0:0:0.334" Value="0.9"/>
                        </DoubleAnimationUsingKeyFrames>

                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="Rectangle_PinEllipseIcon">
                            <DiscreteDoubleKeyFrame KeyTime="0" Value="1.1"/>
                            <LinearDoubleKeyFrame KeyTime="0:0:0.334" Value="1"/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="Rectangle_PinEllipseIcon">
                            <DiscreteDoubleKeyFrame KeyTime="0" Value="1.1"/>
                            <LinearDoubleKeyFrame KeyTime="0:0:0.334" Value="1"/>
                        </DoubleAnimationUsingKeyFrames>
                    </Storyboard><!-- /UnFocused -->

                    <Storyboard x:Key="UnFocusedGreen">
                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="FZMaterial_PinEllipseBorderGreen"
                                                      Storyboard.TargetProperty="(local:FZMaterial.Color)">
                            <DiscreteColorKeyFrame KeyTime="0" Value="{StaticResource GreenPinGlassColor}"/>
                            <LinearColorKeyFrame KeyTime="0:0:0.334" Value="{StaticResource DefaultPinGlassColor}"/>
                        </ColorAnimationUsingKeyFrames>

                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="FZMaterial_PinEllipseFillGreen"
                                                      Storyboard.TargetProperty="(local:FZMaterial.Color)">
                            <DiscreteColorKeyFrame KeyTime="0" Value="{StaticResource GreenPinColor}"/>
                            <LinearColorKeyFrame KeyTime="0:0:0.334" Value="{StaticResource MidGrayColor}"/>
                        </ColorAnimationUsingKeyFrames>
                    </Storyboard>

                    <Storyboard x:Key="UnFocusedRed">
                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="FZMaterial_PinEllipseBorderRed"
                                                      Storyboard.TargetProperty="(local:FZMaterial.Color)">
                            <DiscreteColorKeyFrame KeyTime="0" Value="{StaticResource RedPinGlassColor}"/>
                            <LinearColorKeyFrame KeyTime="0:0:0.334" Value="{StaticResource DefaultPinGlassColor}"/>
                        </ColorAnimationUsingKeyFrames>

                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="FZMaterial_PinEllipseFillRed"
                                                      Storyboard.TargetProperty="(local:FZMaterial.Color)">
                            <DiscreteColorKeyFrame KeyTime="0" Value="{StaticResource RedPinColor}"/>
                            <LinearColorKeyFrame KeyTime="0:0:0.334" Value="{StaticResource MidGrayColor}"/>
                        </ColorAnimationUsingKeyFrames>
                    </Storyboard>
                </DataTemplate.Resources>
                <Grid RenderTransformOrigin="0.5,0.5">
                    <Grid.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform/>
                            <SkewTransform/>
                            <RotateTransform/>
                            <TranslateTransform X="{Binding ScreenSpaceXPos}" Y="{Binding ScreenSpaceYPos}"/>
                        </TransformGroup>
                    </Grid.RenderTransform>
                    <DockPanel x:Name="POI"
                               RenderTransformOrigin="0.5,1"
                               Margin="0,-50,0,0"
                               Opacity="{Binding Opacity}">
                        <DockPanel.RenderTransform>
                            <TransformGroup>
                                <ScaleTransform ScaleX="{Binding Scale}" ScaleY="{Binding Scale}"/>
                                <SkewTransform/>
                                <RotateTransform/>
                                <TranslateTransform X="-50" Y="-100"/>
                            </TransformGroup> 
                        </DockPanel.RenderTransform>
                        <Grid x:Name="Grid_PinType"
                              RenderTransformOrigin="0.5,0.5"
                              Width="{StaticResource AutovistaPinTypeItemSize}"
                              Height="{StaticResource AutovistaPinTypeItemSize}"
                              HorizontalAlignment="Center"
                              VerticalAlignment="Center"
                              DockPanel.Dock="Bottom">
                            <Grid.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform/>
                                    <SkewTransform/>
                                    <RotateTransform/>
                                    <TranslateTransform/>
                                </TransformGroup>
                            </Grid.RenderTransform>
                            <Grid x:Name="Grid_PinEllipse" RenderTransformOrigin="0.5,0.5">
                                <Grid.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform/>
                                        <SkewTransform/>
                                        <RotateTransform/>
                                        <TranslateTransform/>
                                    </TransformGroup>
                                </Grid.RenderTransform>

                                <local:FZMaterial x:Name="FZMaterial_PinEllipseBorderGreen" Style="{StaticResource Style_FZMaterial_PinEllipseBorder}"/>
                                <local:FZMaterial x:Name="FZMaterial_PinEllipseFillGreen" Style="{StaticResource Style_FZMaterial_PinEllipseFill}"/>

                                <local:FZMaterial x:Name="FZMaterial_PinEllipseBorderRed" Style="{StaticResource Style_FZMaterial_PinEllipseBorder}" Visibility="Collapsed"/>
                                <local:FZMaterial x:Name="FZMaterial_PinEllipseFillRed" Style="{StaticResource Style_FZMaterial_PinEllipseFill}" Visibility="Collapsed"/>

                                <local:FZMaterial Style="{StaticResource Style_FZMaterial_PinEllipseBorder}"
                                                  Color="{StaticResource RedPinGlassColor}"
                                                  Width="12"
                                                  Height="12"/>
                            </Grid> 
                            <local:FZMaterial x:Name="Rectangle_PinEllipseIcon" 
                                              Width="{StaticResource AutovistaPinTypeImageSize}"
                                              Height="{StaticResource AutovistaPinTypeImageSize}"
                                              RenderTransformOrigin="0.5,0.5"
                                              ImageSource="/ForzaUI;component/Textures/Data_Bound/Anthem/Autovista_Icons/PinType_None.png"
                                              Color="{StaticResource AlmostWhiteColor}" >
                                <local:FZMaterial.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform/>
                                        <SkewTransform/>
                                        <RotateTransform/>
                                        <TranslateTransform/>
                                    </TransformGroup>
                                </local:FZMaterial.RenderTransform>
                            </local:FZMaterial>
                        </Grid>
                        <StackPanel x:Name="PART_PinTeardrop"
                                    RenderTransformOrigin="0.5,0.5"
                                    Visibility="Hidden"
                                    DockPanel.Dock="Bottom">
                            <StackPanel.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform/>
                                    <SkewTransform/>
                                    <RotateTransform/>
                                    <TranslateTransform/>
                                </TransformGroup>
                            </StackPanel.RenderTransform>
                            <local:FZMaterial Color="{StaticResource DefaultTeardropGlassColor}"
                                              Preset="{StaticResource A_FZMaterialPresetGlassRoundtangle_GlassPanel_OuterAll3px}"
                                              RenderTransformOrigin="0.5,0.5"
                                              Width="106"
                                              Height="106">
                                <Control Template="{StaticResource AutovistaPinIconControlTemplate}"/>
                            </local:FZMaterial>
                            <Decorator Height="8" />
                            <local:FZMaterial Color="#FFFFFFFF"
                                              Data="{StaticResource A_Geometry_SpinnerArrow}"
                                              Width="30"
                                              Height="15"
                                              VerticalAlignment="Bottom"
                                              HorizontalAlignment="Center" />
                            <Decorator Height="8" />
                        </StackPanel>
                    </DockPanel>
                </Grid>
                <DataTemplate.Triggers>
                    <DataTrigger Binding="{Binding Focused}" Value="True">
                        <DataTrigger.EnterActions>
                            <BeginStoryboard Storyboard="{StaticResource Focused}"/>
                            <BeginStoryboard Storyboard="{StaticResource FocusedGreen}"/>
                            <BeginStoryboard Storyboard="{StaticResource FocusedRed}"/>
                        </DataTrigger.EnterActions>
                        <DataTrigger.ExitActions>
                            <BeginStoryboard Storyboard="{StaticResource UnFocused}"/>
                            <BeginStoryboard Storyboard="{StaticResource UnFocusedGreen}"/>
                            <BeginStoryboard Storyboard="{StaticResource UnFocusedRed}"/>
                        </DataTrigger.ExitActions>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.CustomizeBack}">
                        <Setter TargetName="FZMaterial_PinEllipseBorderGreen" Property="Visibility" Value="Collapsed"/>
                        <Setter TargetName="FZMaterial_PinEllipseBorderRed" Property="Visibility" Value="Visible"/>
                        <Setter TargetName="FZMaterial_PinEllipseFillGreen" Property="Visibility" Value="Collapsed"/>
                        <Setter TargetName="FZMaterial_PinEllipseFillRed" Property="Visibility" Value="Visible"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.CustomizeFront}">
                        <Setter TargetName="FZMaterial_PinEllipseBorderGreen" Property="Visibility" Value="Collapsed"/>
                        <Setter TargetName="FZMaterial_PinEllipseBorderRed" Property="Visibility" Value="Visible"/>
                        <Setter TargetName="FZMaterial_PinEllipseFillGreen" Property="Visibility" Value="Collapsed"/>
                        <Setter TargetName="FZMaterial_PinEllipseFillRed" Property="Visibility" Value="Visible"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.CustomizeHorn}">
                        <Setter TargetName="FZMaterial_PinEllipseBorderGreen" Property="Visibility" Value="Collapsed"/>
                        <Setter TargetName="FZMaterial_PinEllipseBorderRed" Property="Visibility" Value="Visible"/>
                        <Setter TargetName="FZMaterial_PinEllipseFillGreen" Property="Visibility" Value="Collapsed"/>
                        <Setter TargetName="FZMaterial_PinEllipseFillRed" Property="Visibility" Value="Visible"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.CustomizeLicensePlate}">
                        <Setter TargetName="FZMaterial_PinEllipseBorderGreen" Property="Visibility" Value="Collapsed"/>
                        <Setter TargetName="FZMaterial_PinEllipseBorderRed" Property="Visibility" Value="Visible"/>
                        <Setter TargetName="FZMaterial_PinEllipseFillGreen" Property="Visibility" Value="Collapsed"/>
                        <Setter TargetName="FZMaterial_PinEllipseFillRed" Property="Visibility" Value="Visible"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.CustomizeSide}">
                        <Setter TargetName="FZMaterial_PinEllipseBorderGreen" Property="Visibility" Value="Collapsed"/>
                        <Setter TargetName="FZMaterial_PinEllipseBorderRed" Property="Visibility" Value="Visible"/>
                        <Setter TargetName="FZMaterial_PinEllipseFillGreen" Property="Visibility" Value="Collapsed"/>
                        <Setter TargetName="FZMaterial_PinEllipseFillRed" Property="Visibility" Value="Visible"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.CustomizeWheels}">
                        <Setter TargetName="FZMaterial_PinEllipseBorderGreen" Property="Visibility" Value="Collapsed"/>
                        <Setter TargetName="FZMaterial_PinEllipseBorderRed" Property="Visibility" Value="Visible"/>
                        <Setter TargetName="FZMaterial_PinEllipseFillGreen" Property="Visibility" Value="Collapsed"/>
                        <Setter TargetName="FZMaterial_PinEllipseFillRed" Property="Visibility" Value="Visible"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.PaintOptions}">
                        <Setter TargetName="FZMaterial_PinEllipseBorderGreen" Property="Visibility" Value="Collapsed"/>
                        <Setter TargetName="FZMaterial_PinEllipseBorderRed" Property="Visibility" Value="Visible"/>
                        <Setter TargetName="FZMaterial_PinEllipseFillGreen" Property="Visibility" Value="Collapsed"/>
                        <Setter TargetName="FZMaterial_PinEllipseFillRed" Property="Visibility" Value="Visible"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Icon}" Value="{x:Static local:PointOfInterestIcon.UpgradePreset}">
                        <Setter TargetName="FZMaterial_PinEllipseBorderGreen" Property="Visibility" Value="Collapsed"/>
                        <Setter TargetName="FZMaterial_PinEllipseBorderRed" Property="Visibility" Value="Visible"/>
                        <Setter TargetName="FZMaterial_PinEllipseFillGreen" Property="Visibility" Value="Collapsed"/>
                        <Setter TargetName="FZMaterial_PinEllipseFillRed" Property="Visibility" Value="Visible"/>
                    </DataTrigger>
                </DataTemplate.Triggers>
            </DataTemplate>


            <Storyboard x:Key="EnteringProgressStory">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(ed:Arc.EndAngle)" Storyboard.TargetName="SpinyProgress">
                    <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                    <EasingDoubleKeyFrame KeyTime="0:0:0.99" Value="360"/>
                </DoubleAnimationUsingKeyFrames>
            </Storyboard><!-- /EnteringProgressStory -->

            <Storyboard x:Key="ShowFooterStory">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="BottomBar">
                    <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
                </DoubleAnimationUsingKeyFrames>
            </Storyboard><!-- /ShowFooterStory -->

            <Storyboard x:Key="HideFooterStory">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="BottomBar">
                    <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
                </DoubleAnimationUsingKeyFrames>
            </Storyboard><!-- /HideFooterStory -->

            <Storyboard x:Key="ShowEnterSpinnyStory">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ProximityChangeProgress">
                    <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
                </DoubleAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Image_EnterIcon">
                    <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Image_ExitIcon">
                    <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
            </Storyboard><!-- /ShowEnterSpinnyStory -->

            <Storyboard x:Key="ShowExitSpinnyStory">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ProximityChangeProgress">
                    <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
                </DoubleAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Image_EnterIcon">
                    <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Image_ExitIcon">
                    <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
                </ObjectAnimationUsingKeyFrames>
            </Storyboard><!-- /ShowExitSpinnyStory -->

            <Storyboard x:Key="HideSpinnyStory">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ProximityChangeProgress">
                    <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                </DoubleAnimationUsingKeyFrames>
            </Storyboard><!-- /HideSpinnyStory -->

            <Storyboard x:Key="PART_TransitionIn">
                <!--ParallelTimeline x:Name="TimelineTemplate_Footer_TransitionIn" BeginTime="0:0:0.000"--><!-- Template : v0 10.31.14 -->
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="PART_LayoutRoot">
                        <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                        <EasingDoubleKeyFrame KeyTime="0:0:0.500" Value="1"/><!-- This is when help buttons get assigned. Must be 0:0:0.500 or sooner. -->
                    </DoubleAnimationUsingKeyFrames>
                <StringAnimationUsingKeyFrames Storyboard.TargetProperty="(local:EventFire.EventName)" Storyboard.TargetName="EventFire_Footer">
                    <DiscreteStringKeyFrame KeyTime="{StaticResource BeginTransitionKeyTime}" Value="TransitionIn_Start"/>
                </StringAnimationUsingKeyFrames>
                <!--/ParallelTimeline--><!-- TimelineTemplate_Footer_TransitionIn : v0 10.31.14 -->
            </Storyboard><!-- /TransitionIn -->

            <Storyboard x:Key="PART_TransitionOut">
                <!--ParallelTimeline x:Name="TimelineTemplate_Footer_TransitionOut" BeginTime="0:0:0.000"--><!-- Template : v0 10.31.14 -->
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="PART_LayoutRoot">
                        <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.233" Value="1"/>
                    </DoubleAnimationUsingKeyFrames>
                <StringAnimationUsingKeyFrames Storyboard.TargetProperty="(local:EventFire.EventName)" Storyboard.TargetName="EventFire_Footer">
                    <DiscreteStringKeyFrame KeyTime="{StaticResource BeginTransitionKeyTime}" Value="TransitionOut_Start"/>
                </StringAnimationUsingKeyFrames>
                <!--/ParallelTimeline--><!-- TimelineTemplate_Footer_TransitionOut : v0 10.31.14 -->
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ProximityChangeProgress">
                    <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
                </DoubleAnimationUsingKeyFrames>
            </Storyboard><!-- /TransitionOut -->

            <Storyboard x:Key="OnPopupShow">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ListBox_Pins">
                    <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                    <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
                </DoubleAnimationUsingKeyFrames>
            </Storyboard><!-- /OnPopupShow -->

            <Storyboard x:Key="OnPopupClose">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ListBox_Pins">
                    <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                    <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
                </DoubleAnimationUsingKeyFrames>
            </Storyboard><!-- /OnPopupClose -->
        </ResourceDictionary>
    </Page.Resources>

    <local:EventFire.FzTriggers>
        <local:EventFireTrigger Event="ShowEnterSpinny" Storyboard="{StaticResource ShowEnterSpinnyStory}"/>
        <local:EventFireTrigger Event="ShowExitSpinny" Storyboard="{StaticResource ShowExitSpinnyStory}"/>
        <local:EventFireTrigger Event="HideSpinny" Storyboard="{StaticResource HideSpinnyStory}"/>
        <local:EventFireTrigger Event="ShowFooter" Storyboard="{StaticResource ShowFooterStory}"/>
        <local:EventFireTrigger Event="HideFooter" Storyboard="{StaticResource HideFooterStory}"/>
        <local:EventFireTrigger Event="ShowPins" Storyboard="{StaticResource OnPopupClose}"/>
        <local:EventFireTrigger Event="HidePins" Storyboard="{StaticResource OnPopupShow}"/>
    </local:EventFire.FzTriggers>

    <Grid x:Name="PART_LayoutRoot" SnapsToDevicePixels="False" Opacity="0">
        <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="VisualStateGroup">
                <VisualState x:Name="PART_DemoState">
                    <Storyboard/>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>

        <local:ZPanel>
            <local:CommonListBox x:Name="ListBox_Pins"
                ItemsSource="{Binding Pins}"
                ItemTemplate="{StaticResource AutovistaPinItemDataTemplate}"
                ItemContainerStyle="{StaticResource AutovistaPinListBoxItemStyle}"
                Style="{StaticResource AutovistaPinListBoxStyle}"
                Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType=Page}}"
                Height="{Binding ActualHeight, RelativeSource={RelativeSource AncestorType=Page}}"
                IsEnabled="false"
                Canvas.Left="0" Canvas.Top="0"
                Panel.ZIndex="0"/>

            <Grid x:Name="ProximityChangeProgress" Width="120" Height="120" Opacity="0">
                <Grid.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform x:Name="PART_TranslateTransformForAnimationStack"/>
                    </TransformGroup>
                </Grid.RenderTransform>
                <Grid Height="100" Width="100" RenderTransformOrigin="0.5,1">
                    <Grid.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform/>
                            <SkewTransform/>
                            <RotateTransform/>
                            <TranslateTransform X="-50" Y="-100"/>
                        </TransformGroup>
                    </Grid.RenderTransform>
                    <Ellipse x:Name="Ellipse_BG" Height="80" Width="80" Fill="{StaticResource DarkGray80Brush}" RenderTransformOrigin="0.5,0.5">
                        <Ellipse.RenderTransform>
                            <TransformGroup>
                                <ScaleTransform/>
                                <SkewTransform/>
                                <RotateTransform/>
                                <TranslateTransform/>
                            </TransformGroup>
                        </Ellipse.RenderTransform>
                    </Ellipse>

                    <ed:Arc x:Name="SpinyProgress"
                            EndAngle="0"
                            Height="86.5"
                            StartAngle="0"
                            Stroke="{StaticResource GreenPinBrush}"
                            StrokeThickness="6.5"
                            Style="{StaticResource ProgressArcStyle}"
                            Width="86.5"/>
                    <ed:Arc x:Name="SpinyProgressBorder"
                            Height="100"
                            Stroke="{StaticResource DarkGray80Brush}"
                            StrokeThickness="7"
                            Style="{StaticResource ProgressArcStyle}"
                            EndAngle="360"
                            Width="100"/>
                    <Image x:Name="Image_EnterIcon" Source="/ForzaUI;component/Textures/Data_Bound/Anthem/Autovista_Icons/EnterCar/Enter_Car.png" VerticalAlignment="Center"
                HorizontalAlignment="Center" Height="{StaticResource AutovistaPinImageSize}" Width="{StaticResource AutovistaPinImageSize}"/>
                    <Image x:Name="Image_ExitIcon" Source="/ForzaUI;component/Textures/Data_Bound/Anthem/Autovista_Icons/LeaveCar/Leave_Car.png" VerticalAlignment="Center"
                HorizontalAlignment="Center" Height="{StaticResource AutovistaPinImageSize}" Width="{StaticResource AutovistaPinImageSize}"/>
                </Grid>
            </Grid>
        </local:ZPanel>

        <ContentControl x:Name="BottomBar" Style="{StaticResource A_Style_ButtonBar}">
            <ContentControl x:Name="PART_DefaultHelpPanel" Style="{StaticResource A_Style_ContentControl_DefaultButtonBar}" />
        </ContentControl>

        <ForzaUI_Controls:StoryboardController x:Name="EnteringController" SeekPct="{Binding SpinnyProgress}" Target="{StaticResource EnteringProgressStory}"/>

        <local:EventFire x:Name="EventFire_Footer" />
    </Grid>
</Page>
