<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:ForzaUI"
    xmlns:System="clr-namespace:System;assembly=mscorlib">

    <Thickness x:Key="A_Thickness_FeaturedPaintCarImageMargin">50,-40,50,35</Thickness>

    <Style x:Key="A_Style_FZTextBlock_FeaturedLiveTileTitle"
        TargetType="{x:Type local:FZTextBlock}"
        BasedOn="{StaticResource A_Style_FZTextBlock_TileTitle}">
        <Setter Property="HorizontalAlignment" Value="Center"/>
        <Setter Property="VerticalAlignment" Value="Top"/>
    </Style>

    <Style x:Key="A_Style_FZTextBlock_FeaturedLiveTileText"
        TargetType="{x:Type local:FZTextBlock}"
        BasedOn="{StaticResource A_Style_FZTextBlock_TileText_Base}">
        <Setter Property="Color" Value="{StaticResource A_Color_Tile_Text}"/>
        <Style.Triggers>
            <DataTrigger Binding="{Binding (local:TileMenuNavigationManager.LockState), RelativeSource={RelativeSource FindAncestor, AncestorType=Button}}"
                         Value="{x:Static local:LockState.Locked}">
                <Setter Property="Color"
                        Value="{StaticResource A_Color_Tile_Title_Locked_Alternate}" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <ControlTemplate x:Key="A_ControlTemplate_FeaturedLiveTileLikes"
                     TargetType="{x:Type ContentControl}">
        <local:FZMaterial RenderTransformOrigin="1,1"
            Color="{StaticResource A_Color_Tile_TintedPanel}">
            <local:FZMaterial.RenderTransform>
                <RotateTransform Angle="45" />
            </local:FZMaterial.RenderTransform>
            <StackPanel Orientation="Vertical"
                HorizontalAlignment="Center"
                VerticalAlignment="Bottom">
                <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_HorizonB}"
                    HorizontalAlignment="Center"
                    Color="{StaticResource A_Color_Tile_Title_Alternate}"
                    CapHeight="13"
                    Text="{local:Loc Storefront.IDS_Likes}"
                    MaxWidth="50"
                    Margin="0,0,0,8" />
                <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_HorizonA}"
                    HorizontalAlignment="Center"
                    Color="{StaticResource A_Color_Tile_Title_Alternate}"
                    CapHeight="15"
                    Text="{Binding Content, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource A_NumUnitConverter_ShowUnit_0dp}}"
                    MaxWidth="90"
                    Margin="0,0,0,12" />
            </StackPanel>
        </local:FZMaterial>
    </ControlTemplate>

    <Style x:Key="A_Style_ContentControl_FeaturedLiveTileLikes"
        TargetType="{x:Type ContentControl}">
        <Setter Property="Template" Value="{StaticResource A_ControlTemplate_FeaturedLiveTileLikes}" />
        <Setter Property="ClipToBounds" Value="True" />
        <Setter Property="Width" Value="159" />
        <Setter Property="Height" Value="112" />
        <Setter Property="VerticalAlignment" Value="Top" />
        <Setter Property="HorizontalAlignment" Value="Right" />
        <Setter Property="Visibility" Value="{Binding Content, RelativeSource={RelativeSource Self}, Converter={StaticResource A_FZBooleanToVisibilityConverter}}" />
    </Style>

    <Style
        x:Key="H_Run_Tile_FeaturedHeaderText_BOLD"
        TargetType="{Type FZRun}">
        <Setter Property="Color" Value="{StaticResource H_Color_Primary_Green}"/>
        <Setter Property="CapHeight" Value="40"/>
    </Style>

    <Style
        x:Key="H_Run_Tile_FeaturedHeaderText_SMALL"
        TargetType="{Type FZRun}">
        <Setter Property="CapHeight" Value="40"/>
    </Style>

    <Style
        x:Key="H_Run_Tile_FeaturedHeaderText_BOLDDEFAULTSIZE"
        TargetType="{Type FZRun}">
        <Setter Property="Color" Value="{StaticResource H_Color_Primary_Green}"/>
    </Style>

    <!-- 
    to maintain compat with any other existing uses of the strings in the content DB, we are making our "BOLD" case 'small' for this scene
    so the 'default' case can be the regular size. we add 'SMALL' for strings that don't want their top line (or whatever) to be bold but still want it small (such as the Autoshow Car Vouchers)
    and finally adding BOLDDEFAULTSIZE, though currently unused, for any DLC that wants to highlight a keyword on the second line
    
    While this approach isn't as 'pure' as I'd like since it ties the DisplayNameMarkup in ContentOffers.sql a bit more closely to the places it is displayed in-game, that is already true 
    since it includes a newline char specifically for display and I couldn't find any other places it is used than here and A_MarketplacePackSelect's A_MappingConverter_MarketplacePackText, which I'm also updating.
    - plus the alternative would be either 
        a) having FeaturedMarketplaceLiveTileItem do string splitting on newline characters to make the top and bottom lines separate string properties, 
           which would THEN require a new "TitleLineTwo" property on BaseFeaturedLiveTileItem, which we could put in a different textblock and style separately without requiring markup in the source strings
        or
        b) adding a second string to the db schema and making the strings authored for line1/line2. and they already have a "title"/"subtitle" for other purposes so that also feels a tad weird
    -->
    <MappingConverter x:Key="A_MappingConverter_FeaturedHeaderText">
        <MappingConverterEntry Key="{NoCase BOLD}" Value="{StaticResource H_Run_Tile_FeaturedHeaderText_BOLD}" />
        <MappingConverterEntry Key="{NoCase SMALL}" Value="{StaticResource H_Run_Tile_FeaturedHeaderText_SMALL}" />
        <MappingConverterEntry Key="{NoCase BOLDDEFAULTSIZE}" Value="{StaticResource H_Run_Tile_FeaturedHeaderText_BOLDDEFAULTSIZE}" />
    </MappingConverter>

    <Style x:Key="H_Style_ImageTile_FeaturedHeadingText"
        TargetType="{Type FZTextBlock}"
        BasedOn="{StaticResource H_Style_ImageTile_HeadingText}">
        <Setter Property="VerticalAlignment" Value="Bottom"/>
        <Setter Property="CapHeight" Value="45" />
        <Setter Property="MarkupConverter" Value="{StaticResource A_MappingConverter_FeaturedHeaderText}" />
    </Style>

    <Style
        x:Key="H_Run_Tile_FeaturedDescriptionText_BOLD"
        TargetType="{Type FZRun}">
        <Setter Property="Color" Value="{StaticResource H_Color_Primary_Green}"/>
    </Style>

    <MappingConverter x:Key="A_MappingConverter_FeaturedDescriptionText">
        <MappingConverterEntry Key="{NoCase BOLD}" Value="{StaticResource H_Run_Tile_FeaturedDescriptionText_BOLD}" />
        <MappingConverterEntry Key="{NoCase FP_ICON}" Value="{StaticResource H_Run_DesriptionText_FP_ICON}" />
    </MappingConverter>

    <Style x:Key="H_Style_ImageTile_FeaturedDescriptionText"
        TargetType="{Type FZTextBlock}"
        BasedOn="{StaticResource H_Style_ImageTile_DescriptionText}">
        <Setter Property="MarkupConverter" Value="{StaticResource A_MappingConverter_FeaturedDescriptionText}" />
    </Style>

    <DataTemplate x:Key="H_Template_FeaturedImageTile">
        <Grid>
            <FZMaterial Style="{StaticResource H_Style_Tile_Background}" />
            <FZMaterial Style="{StaticResource A_Style_ImageTile_LockBackground}" />
            <FZMaterial Style="{StaticResource A_Style_ImageTile_LockMaterial}" />
            <DockPanel
                Style="{StaticResource H_Style_ImageTile_ContentsPanel}">
                <FZTextBlock
                    Style="{StaticResource H_Style_ImageTile_FeaturedDescriptionText}"
                    Margin="0,29,0,0"
                    DockPanel.Dock="Bottom"/>
                <FZTextBlock
                    Style="{StaticResource H_Style_ImageTile_FeaturedHeadingText}"/>
            </DockPanel>
        </Grid>
    </DataTemplate>

    <DataTemplate DataType="{x:Type local:BaseFeaturedLiveTileItem}">
        <ContentPresenter>
            <ContentPresenter.ContentTemplateSelector>
                <BaseFeaturedLiveTileTemplateSelector ImageTemplate="{StaticResource H_Template_FeaturedImageTile}"
                                                      VideoTemplate="{StaticResource H_Template_VideoTile}"/>
            </ContentPresenter.ContentTemplateSelector>
            <ContentPresenter.Content>
                <VideoTileMenuDataItem
                    Heading="{Binding DataContext.TitleText, RelativeSource={RelativeSource TemplatedParent}}"
                    Description="{Binding DataContext.SubtitleText, RelativeSource={RelativeSource TemplatedParent}}"
                    Icon="{Binding DataContext.ImageSource, RelativeSource={RelativeSource TemplatedParent}}"
                    Source="{Binding DataContext.VideoPath, RelativeSource={RelativeSource TemplatedParent}}"
                    VideoWidth="1148"
                    VideoHeight="572"
                    VideoHorizontalAlignment="Center"
                    VideoVerticalAlignment="Center"/>
            </ContentPresenter.Content>
        </ContentPresenter>
    </DataTemplate>

    <DataTemplate DataType="{x:Type local:FeaturedPaintLiveTileItem}">
        <Grid x:Name="Root"
            Style="{StaticResource A_Style_FrameworkElement_LiveTileItemRoot}">
            <local:FZMaterial ImageSourceNoPreload="/ForzaUI;component/Textures/Anthem/TileBackgrounds/MyDesignsGrid.png"
                Stretch="Uniform"
                StretchDirection="DownOnly"
                Opacity="1"/>
            <local:FZMaterial x:Name="CarImageMaterial"
                              ImageSource="{Binding CarImageSource}" 
                              Stretch="Uniform"
                              Margin="{StaticResource A_Thickness_FeaturedPaintCarImageMargin}"/>
            <ContentControl Style="{StaticResource A_Style_ContentControl_TileTitlePanel_NoCorners}">
                <Grid>
                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_FeaturedLiveTileTitle}"
                        Text="{Binding TitleText, Converter={StaticResource A_StringToUpper}}"/>
                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_FeaturedLiveTileText}"
                        Text="{local:Loc PauseMenu.IDS_TileTitle_FeaturedDesign}"/>
                </Grid>
            </ContentControl>
            <ContentControl Style="{StaticResource A_Style_ContentControl_InfoBox}"
                HorizontalAlignment="Left"
                VerticalAlignment="Top"
                Margin="6">
                <Grid>
                    <local:FZTextBlock VerticalAlignment="Top"
                        Text="{local:Loc Storefront.IDS_LabelCreator}"
                        Style="{StaticResource A_Style_FZTextBlock_InfoBox_Title}"/>
                    <local:FZTextBlock VerticalAlignment="Bottom"
                        Text="{Binding UserProfile.FormattedGamertag}"
                        Style="{StaticResource A_Style_FZTextBlock_InfoBox_Value}"/>
                </Grid>
            </ContentControl>
            <ContentControl Style="{StaticResource A_Style_ContentControl_FeaturedLiveTileLikes}"
                Content="{Binding DataItem.LikesCount}"/>
        </Grid>
    </DataTemplate>

    <DataTemplate DataType="{x:Type local:FeaturedPhotoLiveTileItem}">
        <Grid x:Name="Root"
            Style="{StaticResource A_Style_FrameworkElement_LiveTileItemRoot}">
            <Decorator ClipToBounds="True">
                <local:FZMaterial ImageSource="{Binding ImageSource}" 
                    Stretch="UniformToFill"
                    GreedyMeasure="True"
                    VerticalAlignment="Center"
                    HorizontalAlignment="Center"/>
            </Decorator>
            <local:FZMaterial ImageSourceNoPreload="/ForzaUI;component/Textures/Anthem/TileBackgrounds/Vignette.png"
                Opacity="0.7"/>
            <ContentControl Style="{StaticResource A_Style_ContentControl_TileTitlePanel_NoCorners}">
                <Grid>
                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_FeaturedLiveTileTitle}"
                        Text="{Binding TitleText, Converter={StaticResource A_StringToUpper}}"/>
                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_FeaturedLiveTileText}"
                        Text="{local:Loc PauseMenu.IDS_TileTitle_FeaturedPhoto}"/>
                </Grid>
            </ContentControl>
            <ContentControl Style="{StaticResource A_Style_ContentControl_InfoBox}"
                HorizontalAlignment="Left"
                VerticalAlignment="Top"
                Margin="6">
                <Grid>
                    <local:FZTextBlock VerticalAlignment="Top"
                        Text="{local:Loc Storefront.IDS_LabelCreator}"
                        Style="{StaticResource A_Style_FZTextBlock_InfoBox_Title}"/>
                    <local:FZTextBlock VerticalAlignment="Bottom"
                        Text="{Binding UserProfile.FormattedGamertag}"
                        Style="{StaticResource A_Style_FZTextBlock_InfoBox_Value}"/>
                </Grid>
            </ContentControl>
            <ContentControl Style="{StaticResource A_Style_ContentControl_FeaturedLiveTileLikes}"
                Content="{Binding DataItem.LikesCount}"/>
        </Grid>
    </DataTemplate>

    <DataTemplate DataType="{x:Type local:FeaturedLayerGroupLiveTileItem}">
        <Grid x:Name="Root"
            Style="{StaticResource A_Style_FrameworkElement_LiveTileItemRoot}">
            <local:FZMaterial ImageSourceNoPreload="/ForzaUI;component/Textures/Anthem/TileBackgrounds/MyDesignsGrid.png"
                Stretch="Uniform"
                StretchDirection="DownOnly"
                Opacity="1"/>
            <local:FZMaterial ImageSource="{Binding ImageSource}"
                              Stretch="Uniform"
                              Margin="20,20,20,100"/>
            <ContentControl Style="{StaticResource A_Style_ContentControl_TileTitlePanel_NoCorners}">
                <Grid>
                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_FeaturedLiveTileTitle}"
                        Text="{Binding TitleText, Converter={StaticResource A_StringToUpper}}"/>
                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_FeaturedLiveTileText}"
                        Text="{local:Loc PauseMenu.IDS_TileTitle_FeaturedVinylGroup}"/>
                </Grid>
            </ContentControl>
            <ContentControl Style="{StaticResource A_Style_ContentControl_InfoBox}"
                HorizontalAlignment="Left"
                VerticalAlignment="Top"
                Margin="6">
                <Grid>
                    <local:FZTextBlock VerticalAlignment="Top"
                        Text="{local:Loc Storefront.IDS_LabelCreator}"
                        Style="{StaticResource A_Style_FZTextBlock_InfoBox_Title}"/>
                    <local:FZTextBlock VerticalAlignment="Bottom"
                        Text="{Binding UserProfile.FormattedGamertag}"
                        Style="{StaticResource A_Style_FZTextBlock_InfoBox_Value}"/>
                </Grid>
            </ContentControl>
            <ContentControl Style="{StaticResource A_Style_ContentControl_FeaturedLiveTileLikes}"
                Content="{Binding DataItem.LikesCount}"/>
        </Grid>
    </DataTemplate>

    <Size x:Key="A_Size_JoinFriendGamerPicSizeParams">306,234</Size>

    <DataTemplate DataType="{x:Type local:JoinFriendItem}">
        <local:FZMaterial x:Name="Root"
            Style="{StaticResource A_Style_FrameworkElement_LiveTileItemRoot}">
            <Grid ClipToBounds="True">
                <local:FZMaterial x:Name="GamerPicMaterial"
                    Style="{StaticResource A_Style_FZMaterial_LockableImageTileBackground_NoCorners}"
                    ImageSource="{Binding UserProfile, Converter={StaticResource A_GamerPicConverter}, ConverterParameter={StaticResource A_Size_JoinFriendGamerPicSizeParams}}"
                    Stretch="UniformToFill"
                    VerticalAlignment="Center"
                    Visibility="{Binding Downloaded, RelativeSource={RelativeSource Self}, Converter={StaticResource A_FZBooleanToVisibilityConverter_UseHidden}}"/>
                <ProgressBar Style="{StaticResource A_Style_ProgressBar_WaitSpinner}"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    Visibility="{Binding Downloaded, ElementName=GamerPicMaterial, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}, FallbackValue={x:Static Visibility.Hidden}}"/>
                <ContentControl x:Name="TileTitlePanel"
                    Style="{StaticResource A_Style_ContentControl_TileTitlePanel_NoCorners}">
                    <Grid>
                        <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_FeaturedLiveTileTitle}"
                            Text="{local:Loc PauseMenu.IDS_TileTitle_JoinFriends}"/>
                        <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_FeaturedLiveTileText}"
                            Text="{Binding UserProfile.FormattedGamertag}"/>
                    </Grid>
                </ContentControl>
            </Grid>
        </local:FZMaterial>
    </DataTemplate>

    <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPresetRoundtangle_FeaturedAuctionBackground"
        GradientColorA="#FF999999"
        GradientColorB="#FFFFFFFF"
        GradientAngle="0"/>

    <ImageSource x:Key="A_BitmapImage_FeaturedAuctionInfoBox">/ForzaUI;component/Textures/Anthem/Icons/InfoBoxes/FeaturedAuction.png</ImageSource>

    <DataTemplate DataType="{x:Type local:FeaturedAuctionLiveTileItem}">
        <Grid x:Name="Root"
            Style="{StaticResource A_Style_FrameworkElement_LiveTileItemRoot}">
            <local:FZMaterial Preset="{StaticResource A_FZMaterialPresetRoundtangle_FeaturedAuctionBackground}"/>
            <local:FZMaterial x:Name="CarImageMaterial"
                              ImageSource="{Binding CarImageSource}" 
                              Stretch="Uniform"
                              Margin="0,-50,0,65"/>
            <ContentControl Style="{StaticResource A_Style_ContentControl_TileTitlePanel_NoCorners}">
                <Grid>
                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_FeaturedLiveTileTitle}"
                        Text="{Binding TitleText, Converter={StaticResource A_StringToUpper}}"/>
                    <StackPanel Orientation="Horizontal"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Bottom">
                        <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_FeaturedLiveTileText}"
                            Text="{local:Loc AuctionHouse.IDS_Time_Remaining}"
                            Color="{StaticResource A_Color_Tile_Text_OnDarkBg}"/>
                        <Decorator Width="6"/>
                        <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_FeaturedLiveTileText}"
                            Text="{Binding DataItem.TimeRemaining, Converter={StaticResource A_Converter_AuctionTime}}"/>
                    </StackPanel>
                </Grid>
            </ContentControl>
            <StackPanel Orientation="Vertical"
                HorizontalAlignment="Left"
                VerticalAlignment="Top"
                Margin="6">
                <ContentControl Style="{StaticResource A_Style_ContentControl_InfoBoxWithIcon}"
                    Tag="{StaticResource A_BitmapImage_FeaturedAuctionInfoBox}"
                    HorizontalAlignment="Left">
                    <Grid>
                        <local:FZTextBlock Text="{local:Loc AuctionHouse.IDS_HighestBid}"
                            Style="{StaticResource A_Style_FZTextBlock_InfoBoxWithIcon_Title}"/>
                        <StackPanel Orientation="Horizontal"
                            VerticalAlignment="Bottom">
                            <local:FZMaterial Width="19"
                                Height="19"
                                Color="{StaticResource A_Color_Tile_Text}"
                                ImageSource="/ForzaUI;component/Textures/Anthem/Icons/CRIcon/CR_85_FilledCircle.png"/>
                            <Decorator Width="4"/>
                            <local:FZTextBlock Text="{Binding DataItem.HighestBid, Converter={StaticResource A_NumUnitConverter_NoUnit_0dp}}"
                                Style="{StaticResource A_Style_FZTextBlock_InfoBoxWithIcon_Value}"
                                VerticalAlignment="Center"/>
                        </StackPanel>
                    </Grid>
                </ContentControl>
                <Control Style="{StaticResource A_Style_Control_AuctionHouse_RarityPill}"
                    DataContext="{Binding DataItem}"
                    HorizontalAlignment="Left"
                    Height="33"
                    Margin="0,0,0,6"/>
                <Control Style="{StaticResource A_Style_Control_AuctionHouse_BarnFindPill}"
                    DataContext="{Binding DataItem}"
                    HorizontalAlignment="Left"
                    Height="33"
                    Margin="0,0,0,6"/>
            </StackPanel>
            <ContentControl Style="{StaticResource A_Style_ContentControl_InfoBox}"
                HorizontalAlignment="Right"
                VerticalAlignment="Bottom"
                Margin="6,6,6,76">
                <Grid>
                    <local:FZTextBlock VerticalAlignment="Top"
                        Text="{local:Loc AuctionHouse.IDS_Seller}"
                        Style="{StaticResource A_Style_FZTextBlock_InfoBox_Title}"/>
                    <local:FZTextBlock VerticalAlignment="Bottom"
                        Text="{Binding DataItem.Seller.FormattedGamertag}"
                        Style="{StaticResource A_Style_FZTextBlock_InfoBox_Value}"/>
                </Grid>
            </ContentControl>
        </Grid>
    </DataTemplate>

    <Style x:Key="A_Style_Button_FeaturedTile"
        TargetType="{x:Type local:MultiItemLiveTile}"
        BasedOn="{StaticResource H_Style_Tile}">
        <Setter
            Property="Grid.ColumnSpan"
            Value="2" />
        <Setter
            Property="Grid.RowSpan"
            Value="8" />
        <Setter
            Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <FZMaterial
                            Preset="{StaticResource H_GlassRoundtangle_8px}"
                            Color="{StaticResource H_Color_Glass_Purple_20pc}" />
                        <ProgressBar
                            x:Name="IdleSpinner"
                            IsIndeterminate="True"
                            Style="{StaticResource A_Style_ProgressBar_WaitSpinner}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Opacity="0"/>
                        <Grid
                            x:Name="Content"
                            Opacity="1">
                            <ContentPresenter
                                x:Name="ContentIfEmpty"
                                ContentTemplate="{StaticResource H_Template_ImageTile}"
                                Visibility="{Binding Items.Count, RelativeSource={RelativeSource AncestorType={Type MultiItemLiveTile}}, Converter={StaticResource H_VisibleIfLessThanOne}, FallbackValue={Static Visibility.Visible}}"/>
                            <Grid
                                x:Name="ContentWithItems"
                                Visibility="{Binding Items.Count, RelativeSource={RelativeSource AncestorType={Type MultiItemLiveTile}}, Converter={StaticResource H_CollapseIfLessThanOne}, FallbackValue={Static Visibility.Collapsed}}">
                                <ItemsSelector
                                    x:Name="MainSelector"
                                    SelectedIndex="{Binding SelectedItemIndex, Mode=TwoWay, RelativeSource={RelativeSource AncestorType={Type MultiItemLiveTile}}, FallbackValue=0}"
                                    Style="{StaticResource A_Style_ItemsSelector_ItemDisplay}"
                                    IsHitTestVisible="False"
                                    ItemsSource="{Binding Items, RelativeSource={RelativeSource AncestorType={Type MultiItemLiveTile}}}" />
                                <ItemsSelector
                                    x:Name="DotSelector"
                                    SelectedIndex="{Binding SelectedItemIndex, Mode=OneWay, RelativeSource={RelativeSource AncestorType={Type MultiItemLiveTile}}, FallbackValue=0}" 
                                    Style="{StaticResource A_Style_ItemsSelector_SelectionDots}"
                                    VerticalAlignment="Bottom"
                                    HorizontalAlignment="Right"
                                    Margin="22"
                                    IsHitTestVisible="False"
                                    Visibility="{Binding Items.Count, RelativeSource={RelativeSource AncestorType={Type MultiItemLiveTile}}, Converter={StaticResource H_VisibleIfGreaterThanOne}}"
                                    ItemsSource="{Binding Items, RelativeSource={RelativeSource AncestorType={Type MultiItemLiveTile}}}"/>
                            </Grid>
                        </Grid>
                    </Grid>
                    <DataTemplate.Triggers>
                        <DataTrigger
                            Binding="{Binding IsLoadingItems, RelativeSource={RelativeSource AncestorType=MultiItemLiveTile}, FallbackValue=False}"
                            Value="True">
                            <DataTrigger.EnterActions>
                                <BeginStoryboard
                                    Name="ShowIsLoadingItems">
                                    <BeginStoryboard.Storyboard>
                                        <Storyboard>
                                            <DoubleAnimation Duration="0:0:0.0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="IdleSpinner" />
                                            <DoubleAnimation Duration="0:0:0.0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Content" />
                                        </Storyboard>
                                    </BeginStoryboard.Storyboard>
                                </BeginStoryboard>
                            </DataTrigger.EnterActions>
                            <DataTrigger.ExitActions>
                                <StopStoryboard
                                    BeginStoryboardName="ShowIsLoadingItems" />
                                <BeginStoryboard>
                                    <BeginStoryboard.Storyboard>
                                        <Storyboard
                                            FillBehavior="Stop">
                                            <DoubleAnimation Duration="0:0:0.5" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="IdleSpinner" />
                                            <DoubleAnimation Duration="0:0:0.5" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Content" />
                                        </Storyboard>
                                    </BeginStoryboard.Storyboard>
                                </BeginStoryboard>
                            </DataTrigger.ExitActions>
                        </DataTrigger>
                    </DataTemplate.Triggers>
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding (local:TileMenuNavigationManager.IsOnActiveMenu), RelativeSource={RelativeSource Self}}"
                        Value="True"/>
                    <Condition Binding="{Binding IsFocused, RelativeSource={RelativeSource Self}}"
                        Value="False"/>
                </MultiDataTrigger.Conditions>
                <Setter Property="ShouldAutoCycle" Value="True"/>
            </MultiDataTrigger>
        </Style.Triggers>
    </Style>
</ResourceDictionary>
