<Window x:Class="Hearthstone_Deck_Tracker.Windows.OverlayWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:Hearthstone_Deck_Tracker"
        xmlns:controls="clr-namespace:Hearthstone_Deck_Tracker.Controls"
        xmlns:windows="clr-namespace:Hearthstone_Deck_Tracker.Windows"
        xmlns:utility="clr-namespace:Hearthstone_Deck_Tracker.Utility"
        xmlns:themes="clr-namespace:Hearthstone_Deck_Tracker.Utility.Themes"
        xmlns:overlay="clr-namespace:Hearthstone_Deck_Tracker.Controls.Overlay"
        xmlns:hearthstone="clr-namespace:Hearthstone_Deck_Tracker.Hearthstone"
        xmlns:battlegrounds="clr-namespace:Hearthstone_Deck_Tracker.Controls.Overlay.Battlegrounds"
        xmlns:battlegroundsSession="clr-namespace:Hearthstone_Deck_Tracker.Controls.Overlay.Battlegrounds.Session"
        xmlns:battlegroundsTrinkets="clr-namespace:Hearthstone_Deck_Tracker.Controls.Overlay.Battlegrounds.TrinketPicking"
        xmlns:mulligan="clr-namespace:Hearthstone_Deck_Tracker.Controls.Overlay.Constructed.Mulligan"
        xmlns:tier7="clr-namespace:Hearthstone_Deck_Tracker.Controls.Overlay.Battlegrounds.Tier7"
        xmlns:mercenaries="clr-namespace:Hearthstone_Deck_Tracker.Controls.Overlay.Mercenaries"
        xmlns:ext="clr-namespace:Hearthstone_Deck_Tracker.Utility.Extensions"
        xmlns:anim="clr-namespace:Hearthstone_Deck_Tracker.Utility.Animations"
        xmlns:lex="http://wpflocalizeextension.codeplex.com"
        xmlns:heroPicking="clr-namespace:Hearthstone_Deck_Tracker.Controls.Overlay.Battlegrounds.HeroPicking"
        xmlns:minions="clr-namespace:Hearthstone_Deck_Tracker.Controls.Overlay.Battlegrounds.Minions"
        xmlns:activeEffects="clr-namespace:Hearthstone_Deck_Tracker.Controls.Overlay.Constructed.ActiveEffects"
        lex:LocalizeDictionary.DesignCulture="en"
        lex:ResxLocalizationProvider.DefaultAssembly="HearthstoneDeckTracker"
        lex:ResxLocalizationProvider.DefaultDictionary="Strings"
        Title="HearthstoneOverlay" Height="571" Width="832" Background="{x:Null}" ResizeMode="NoResize"
        ShowInTaskbar="False" SourceInitialized="Window_SourceInitialized_1" AllowsTransparency="True"
        Loaded="OverlayWindow_OnLoaded" Deactivated="OverlayWindow_OnDeactivated"
        WindowStyle="None" Topmost="True" Closing="Window_Closing">
    <Window.Resources>
        <themes:ThemeManager x:Key="ThemeManager"/>
    </Window.Resources>
    <Grid Name="GridMain" ClipToBounds="True">
        <Border BorderThickness="1" BorderBrush="Transparent">
            <Canvas Name="CanvasInfo" HorizontalAlignment="Left" Height="571" VerticalAlignment="Top" Width="832">
                <StackPanel Orientation="Horizontal" Canvas.Right="0" Visibility="{Binding Path=BatteryStatusVisualVisibility, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}">
                    <Rectangle Width="39" Height="20" Margin="5">
                        <Rectangle.RenderTransform>
                            <ScaleTransform CenterX="19.5" ScaleX="-1"/>
                        </Rectangle.RenderTransform>
                        <Rectangle.Fill>
                            <VisualBrush Visual="{Binding Path=BatteryStatusVisual, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}"/>
                        </Rectangle.Fill>
                    </Rectangle>
                    <local:HearthstoneTextBlock VerticalAlignment="Center" Text="{Binding Path=BatteryStatusPercent, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}"
                                            Visibility ="{Binding Path=BatteryStatusTextVisibility, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}"/>
                </StackPanel>
                <local:HearthstoneTextBlock Visibility="Hidden" x:Name="LblOpponentTurnTime" Text="00:00" Canvas.Top="418"
                                        Canvas.Left="418" FontSize="20" />
                <local:HearthstoneTextBlock Visibility="Hidden" x:Name="LblTurnTime" Text="01:15" Canvas.Top="378"
                                        Canvas.Left="353" FontSize="28" />
                <local:HearthstoneTextBlock Visibility="Hidden" x:Name="LblPlayerTurnTime" Text="00:00" Canvas.Top="338"
                                        Canvas.Left="418" FontSize="20" />
                <Border Name="BorderStackPanelPlayer" Canvas.Left="604" Canvas.Top="203" Height="{Binding PlayerStackHeight, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}">
                    <StackPanel Name="StackPanelPlayer" Width="218" VerticalAlignment="{Binding PlayerStackPanelAlignment, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}">
                        <local:HearthstoneTextBlock x:Name="LblDeckTitle" FontSize="16" Width="200" TextAlignment="Center" Text="Deck title" TextWrapping="Wrap"/>
                        <local:HearthstoneTextBlock x:Name="LblWins" FontSize="14" Width="200" TextAlignment="Center" Text="0-0 (0%)"/>
                        <controls:DeckLens x:Name="PlayerTopDeckLens" Label="{lex:Loc DeckLens_Label_OnTop}" />
                        <Viewbox Name="ViewBoxPlayer" StretchDirection="DownOnly" Stretch="Fill" MaxHeight="{Binding PlayerListHeight, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}">
                            <controls:AnimatedCardList x:Name="ListViewPlayer" Background="Transparent" BorderThickness="0"
                                ScrollViewer.HorizontalScrollBarVisibility="Disabled" Width="221"
                                ScrollViewer.VerticalScrollBarVisibility="Disabled" IsEnabled="False"
                                ScrollViewer.CanContentScroll="False">
                            </controls:AnimatedCardList>
                        </Viewbox>
                        <controls:DeckLens x:Name="PlayerBottomDeckLens" Label="{lex:Loc DeckLens_Label_OnBottom}" />
                        <controls:DeckSideboards x:Name="PlayerSideboards" />
                        <Canvas Name="CanvasPlayerCount" HorizontalAlignment="Stretch" Height="40" Width="218" Margin="0,2" Background="{Binding CurrentTheme.OverlayTheme.CardCounterFrame, Source={StaticResource ThemeManager}}">
                            <local:HearthstoneTextBlock x:Name="LblCardCount" FontSize="16" Text="0" Canvas.Left="57" Canvas.Top="8" TextAlignment="Center" Width="56" Height="25" />
                            <local:HearthstoneTextBlock x:Name="LblDeckCount" FontSize="16" Text="30" Canvas.Left="152" Canvas.Top="8" TextAlignment="Center" Width="56" Height="25" />
                        </Canvas>
                        <Canvas Name="CanvasPlayerChance" HorizontalAlignment="Stretch" Height="40" Width="218" Margin="0,2" Background="{Binding CurrentTheme.OverlayTheme.PlayerChanceFrame, Source={StaticResource ThemeManager}}">
                            <local:HearthstoneTextBlock x:Name="LblDrawChance1" FontSize="16" Text="0%" Canvas.Left="71" Canvas.Top="8" TextAlignment="Right" Width="53" Height="25" />
                            <local:HearthstoneTextBlock x:Name="LblDrawChance2" FontSize="16" Text="0%" Canvas.Left="149" Canvas.Top="8" TextAlignment="Right" Width="53" Height="25" />
                        </Canvas>
                        <local:HearthstoneTextBlock x:Name="LblPlayerFatigue" FontSize="14" Text="" Margin="4,0,0,0" TextAlignment="Center"/>
                    </StackPanel>
                </Border>
                <Border Name="BorderStackPanelOpponent" Canvas.Top="203" Canvas.Left="10" Height="{Binding OpponentStackHeight, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}">
                    <StackPanel Name="StackPanelOpponent" Width="218" VerticalAlignment="{Binding OpponentStackPanelAlignment, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}"
                        ext:OverlayExtensions.IsOverlayHoverVisible="True" MouseEnter="StackPanelOpponent_MouseEnter" MouseLeave="StackPanelOpponent_MouseLeave">
                        <local:HearthstoneTextBlock x:Name="LblWinRateAgainst" FontSize="15" Width="200" TextAlignment="Center" Text="VS: 0-0 (0%)"/>
                        <Viewbox Name="ViewBoxOpponent" StretchDirection="DownOnly" Stretch="Fill" MaxHeight="{Binding OpponentListHeight, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}">
                            <controls:AnimatedCardList x:Name="ListViewOpponent" Background="Transparent" BorderThickness="0"
                                ScrollViewer.HorizontalScrollBarVisibility="Disabled" Width="221"
                                ScrollViewer.VerticalScrollBarVisibility="Disabled" IsEnabled="False"
                                ScrollViewer.CanContentScroll="False">
                            </controls:AnimatedCardList>
                        </Viewbox>
                        <controls:DeckLens x:Name="OpponentRelatedCardsDeckLens" Label="{lex:Loc Related_Cards}" />
                        <Canvas Name="CanvasOpponentCount" HorizontalAlignment="Stretch" Height="40" Width="218" Margin="0,2" Background="{Binding CurrentTheme.OverlayTheme.CardCounterFrame, Source={StaticResource ThemeManager}}">
                            <local:HearthstoneTextBlock x:Name="LblOpponentCardCount" FontSize="16" Text="0" Canvas.Left="57" Canvas.Top="8" TextAlignment="Center" Width="56" Height="25" />
                            <local:HearthstoneTextBlock x:Name="LblOpponentDeckCount" FontSize="16" Text="30" Canvas.Left="152" Canvas.Top="8" TextAlignment="Center" Width="56" Height="25" />
                        </Canvas>
                        <Canvas Name="CanvasOpponentChance" HorizontalAlignment="Stretch" Height="71" Width="218" Margin="0,2" Background="{Binding CurrentTheme.OverlayTheme.OpponentChanceFrame, Source={StaticResource ThemeManager}}">
                            <local:HearthstoneTextBlock x:Name="LblOpponentDrawChance1" FontSize="16" Text="0%" Canvas.Left="71" Canvas.Top="8" TextAlignment="Right" Width="53" Height="25" />
                            <local:HearthstoneTextBlock x:Name="LblOpponentDrawChance2" FontSize="16" Text="0%" Canvas.Left="149" Canvas.Top="8" TextAlignment="Right" Width="53" Height="25" />
                            <local:HearthstoneTextBlock x:Name="LblOpponentHandChance1" FontSize="16" Text="0%" Canvas.Left="71" Canvas.Top="39" TextAlignment="Right" Width="53" Height="25" />
                            <local:HearthstoneTextBlock x:Name="LblOpponentHandChance2" FontSize="16" Text="0%" Canvas.Left="149" Canvas.Top="39" TextAlignment="Right" Width="53" Height="25" />
                        </Canvas>
                        <local:HearthstoneTextBlock x:Name="LblOpponentFatigue" FontSize="14" Text="" Margin="4,0,0,0" TextAlignment="Center"/>
                    </StackPanel>
                </Border>
                <overlay:LinkOpponentDeckPanel x:Name="LinkOpponentDeckDisplay" Width="218" Visibility="Hidden" ext:OverlayExtensions.IsOverlayHitTestVisible="True"
                    ext:OverlayExtensions.IsOverlayHoverVisible="True" MouseEnter="LinkOpponentDeckDisplay_MouseEnter" MouseLeave="LinkOpponentDeckDisplay_MouseLeave" />

                <StackPanel Name="StackPanelSecrets" Width="auto" Height="auto" Visibility="Collapsed" />

                <controls:CardMarker x:Name="Marks0" Width="36" Height="34" />
                <controls:CardMarker x:Name="Marks1" Width="36" Height="34" />
                <controls:CardMarker x:Name="Marks2" Width="36" Height="34" />
                <controls:CardMarker x:Name="Marks3" Width="36" Height="34" />
                <controls:CardMarker x:Name="Marks4" Width="36" Height="34" />
                <controls:CardMarker x:Name="Marks5" Width="36" Height="34" />
                <controls:CardMarker x:Name="Marks6" Width="36" Height="34" />
                <controls:CardMarker x:Name="Marks7" Width="36" Height="34" />
                <controls:CardMarker x:Name="Marks8" Width="36" Height="34" />
                <controls:CardMarker x:Name="Marks9" Width="36" Height="34" />
                <StackPanel Canvas.Top="0" Canvas.Right="0">
                    <controls:CardImage x:Name="MercAbility1" Height="{Binding MercAbilityHeight, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}"/>
                    <controls:CardImage x:Name="MercAbility2" Height="{Binding MercAbilityHeight, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}"/>
                    <controls:CardImage x:Name="MercAbility3" Height="{Binding MercAbilityHeight, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}"/>
                </StackPanel>
                <Grid Name="GridOpponentBoard" Width="{Binding BoardWidth, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" Height="{Binding BoardHeight, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}">
                    <ItemsControl Name="OppBoardItemsControl" ItemsSource="{Binding OppBoard, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}">
                        <ItemsControl.ItemTemplate>
                            <DataTemplate>
                                <overlay:BoardMinionOverlayView/>
                            </DataTemplate>
                        </ItemsControl.ItemTemplate>
                        <ItemsControl.ItemsPanel>
                            <ItemsPanelTemplate>
                                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"/>
                            </ItemsPanelTemplate>
                        </ItemsControl.ItemsPanel>
                    </ItemsControl>
                </Grid>
                <Grid Name="GridPlayerBoard" Width="{Binding BoardWidth, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" Height="{Binding BoardHeight, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}">
                    <ItemsControl Name="PlayerBoardItemsControl" ItemsSource="{Binding PlayerBoard, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}">
                        <ItemsControl.ItemTemplate>
                            <DataTemplate>
                                <overlay:BoardMinionOverlayView/>
                            </DataTemplate>
                        </ItemsControl.ItemTemplate>
                        <ItemsControl.ItemsPanel>
                            <ItemsPanelTemplate>
                                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"/>
                            </ItemsPanelTemplate>
                        </ItemsControl.ItemsPanel>
                    </ItemsControl>
                </Grid>
                <Grid Name="GridFlavorText" Visibility="{Binding FlavorTextVisibility, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" Panel.ZIndex="5" Width="298" Height="123" Canvas.Left="-338">
                    <Image Source="../Resources/flavor_text.png"/>
                    <Image Source="../Resources/banner.png" Width="200" VerticalAlignment="Top"/>
                    <local:HearthstoneTextBlock Text="{Binding FlavorTextCardName, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" VerticalAlignment="Top" Margin="0,7,0,0"  HorizontalAlignment="Center" FontSize="14"
                                            FontFamily="{Binding Source={x:Static hearthstone:Card.DefaultFont}}" FontWeight="{Binding Source={x:Static hearthstone:Card.DefaultFontWeight}}"/>
                    <TextBlock utility:AttachedFormattedString.FormattedText="{Binding FlavorText, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" Margin="20,45,20,20" Foreground="Black" TextWrapping="Wrap" TextAlignment="Center" FontWeight="SemiBold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                </Grid>
                <Rectangle Name="RectPlayerHand0" Width="{Binding CardWidth, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" Height="{Binding CardHeight, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}"/>
                <Rectangle Name="RectPlayerHand1" Width="{Binding CardWidth, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" Height="{Binding CardHeight, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}"/>
                <Rectangle Name="RectPlayerHand2" Width="{Binding CardWidth, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" Height="{Binding CardHeight, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}"/>
                <Rectangle Name="RectPlayerHand3" Width="{Binding CardWidth, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" Height="{Binding CardHeight, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}"/>
                <Rectangle Name="RectPlayerHand4" Width="{Binding CardWidth, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" Height="{Binding CardHeight, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}"/>
                <Rectangle Name="RectPlayerHand5" Width="{Binding CardWidth, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" Height="{Binding CardHeight, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}"/>
                <Rectangle Name="RectPlayerHand6" Width="{Binding CardWidth, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" Height="{Binding CardHeight, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}"/>
                <Rectangle Name="RectPlayerHand7" Width="{Binding CardWidth, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" Height="{Binding CardHeight, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}"/>
                <Rectangle Name="RectPlayerHand8" Width="{Binding CardWidth, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" Height="{Binding CardHeight, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}"/>
                <Rectangle Name="RectPlayerHand9" Width="{Binding CardWidth, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" Height="{Binding CardHeight, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}"/>
                <WrapPanel Name="StackPanelAdditionalTooltips" Width="auto" Height="auto" Visibility="Collapsed" Orientation="Vertical"/>
                <overlay:ExperienceCounter x:Name="ExperienceCounter" Visibility="Hidden"/>
                <StackPanel>
                    <StackPanel Orientation="Horizontal" Name="StackPanelWarning" Visibility="Collapsed">
                        <local:HearthstoneTextBlock Text="{lex:Loc Overlay_Label_Warning}" Margin="3" FontSize="16" Fill="Red"/>
                        <local:HearthstoneTextBlock x:Name="LblWarning" Text="{lex:Loc Overlay_Label_CardsNotFound}" Margin="3" FontSize="16" Fill="White"/>
                        <local:HearthstoneTextBlock x:Name="LblWarningCards" Text="" Margin="3" FontSize="16" Fill="White"/>
                    </StackPanel>
                    <local:HearthstoneTextBlock x:Name="TextBlockRestartWarning" Text="{lex:Loc Overlay_Label_Restart}" Visibility="Collapsed" Margin="3" FontSize="16" Fill="Red"/>
                </StackPanel>
                <Grid Name="IconBoardAttackOpponent" Canvas.Top="300" Canvas.Left="300" Width="75" Height="75">
                    <Image Source="/HearthstoneDeckTracker;component/Images/board_damage.png"/>
                    <local:HearthstoneTextBlock x:Name="TextBlockOpponentAttack" FontSize="24" Width="75" Height="75" Text="0" TextAlignment="Center" Margin="0,3,0,0"/>
                </Grid>
                <Grid Name="IconBoardAttackPlayer" Canvas.Top="300" Canvas.Left="350" Width="75" Height="75">
                    <Image Source="/HearthstoneDeckTracker;component/Images/board_damage.png"/>
                    <local:HearthstoneTextBlock x:Name="TextBlockPlayerAttack" FontSize="24" Width="75" Height="75" Text="0" TextAlignment="Center" Margin="0,3,0,0"/>
                </Grid>
                <overlay:CountersOverlay Visibility="Visible" x:Name="OpponentCounters" IsPlayer="false" Panel.ZIndex="10"/>
                <overlay:CountersOverlay Visibility="Visible" x:Name="PlayerCounters" IsPlayer="true" Panel.ZIndex="10"/>
                <activeEffects:ActiveEffectsOverlay Visibility="Visible" x:Name="OpponentActiveEffects" IsPlayer="false" Panel.ZIndex="10"/>
                <activeEffects:ActiveEffectsOverlay Visibility="Visible" x:Name="PlayerActiveEffects" IsPlayer="true" Panel.ZIndex="10"/>
                <overlay:WotogCounter x:Name="WotogIconsPlayer" Canvas.Top="200" Canvas.Right="450"/>
                <overlay:WotogCounter x:Name="WotogIconsOpponent" Canvas.Top="300" Canvas.Right="450"/>
                <local:HearthstoneTextBlock x:Name="BattlegroundsTileText0" Margin="2 -13 0 0" Width="{Binding BattlegroundsTileWidth, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" Height="{Binding BattlegroundsTileHeight, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" FontSize="15" TextAlignment="Center"/>
                <local:HearthstoneTextBlock x:Name="BattlegroundsTurnText0" Margin="2.5 0 0 0" Width="{Binding BattlegroundsTileWidth, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" Height="{Binding BattlegroundsTileHeight, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" FontSize="15" FontStretch="UltraCondensed" TextAlignment="Center" TextTrimming="CharacterEllipsis"/>
                <local:HearthstoneTextBlock x:Name="BattlegroundsTileText1" Margin="2 -14 0 0" Width="{Binding BattlegroundsTileWidth, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" Height="{Binding BattlegroundsTileHeight, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" FontSize="15" TextAlignment="Center"/>
                <local:HearthstoneTextBlock x:Name="BattlegroundsTurnText1" Margin="2.5 -2 0 0" Width="{Binding BattlegroundsTileWidth, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" Height="{Binding BattlegroundsTileHeight, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" FontSize="15" FontStretch="UltraCondensed" TextAlignment="Center" TextTrimming="CharacterEllipsis"/>
                <local:HearthstoneTextBlock x:Name="BattlegroundsTileText2" Margin="1 -15 0 0" Width="{Binding BattlegroundsTileWidth, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" Height="{Binding BattlegroundsTileHeight, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" FontSize="15" TextAlignment="Center"/>
                <local:HearthstoneTextBlock x:Name="BattlegroundsTurnText2" Margin="2 -3 0 0" Width="{Binding BattlegroundsTileWidth, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" Height="{Binding BattlegroundsTileHeight, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" FontSize="15" FontStretch="UltraCondensed" TextAlignment="Center" TextTrimming="CharacterEllipsis"/>
                <local:HearthstoneTextBlock x:Name="BattlegroundsTileText3" Margin=".5 -15 0 0" Width="{Binding BattlegroundsTileWidth, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" Height="{Binding BattlegroundsTileHeight, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" FontSize="15" TextAlignment="Center"/>
                <local:HearthstoneTextBlock x:Name="BattlegroundsTurnText3" Margin=".5 -3 0 0" Width="{Binding BattlegroundsTileWidth, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" Height="{Binding BattlegroundsTileHeight, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" FontSize="15" FontStretch="UltraCondensed" TextAlignment="Center" TextTrimming="CharacterEllipsis"/>
                <local:HearthstoneTextBlock x:Name="BattlegroundsTileText4" Margin="0 -13 0 0" Width="{Binding BattlegroundsTileWidth, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" Height="{Binding BattlegroundsTileHeight, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" FontSize="15" TextAlignment="Center"/>
                <local:HearthstoneTextBlock x:Name="BattlegroundsTurnText4" Margin="0.5 -1 0 0" Width="{Binding BattlegroundsTileWidth, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" Height="{Binding BattlegroundsTileHeight, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" FontSize="15" FontStretch="UltraCondensed" TextAlignment="Center" TextTrimming="CharacterEllipsis"/>
                <local:HearthstoneTextBlock x:Name="BattlegroundsTileText5" Margin="-2 -14 0 0" Width="{Binding BattlegroundsTileWidth, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" Height="{Binding BattlegroundsTileHeight, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" FontSize="15" TextAlignment="Center"/>
                <local:HearthstoneTextBlock x:Name="BattlegroundsTurnText5" Margin="-1.5 -2 0 0" Width="{Binding BattlegroundsTileWidth, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" Height="{Binding BattlegroundsTileHeight, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" FontSize="15" FontStretch="UltraCondensed" TextAlignment="Center" TextTrimming="CharacterEllipsis"/>
                <local:HearthstoneTextBlock x:Name="BattlegroundsTileText6" Margin="-1.5 -13 0 0" Width="{Binding BattlegroundsTileWidth, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" Height="{Binding BattlegroundsTileHeight, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" FontSize="15" TextAlignment="Center"/>
                <local:HearthstoneTextBlock x:Name="BattlegroundsTurnText6" Margin="-1 -1 0 0" Width="{Binding BattlegroundsTileWidth, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" Height="{Binding BattlegroundsTileHeight, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" FontSize="15" FontStretch="UltraCondensed" TextAlignment="Center" TextTrimming="CharacterEllipsis"/>
                <local:HearthstoneTextBlock x:Name="BattlegroundsTileText7" Margin="-2.5 -11 0 0" Width="{Binding BattlegroundsTileWidth, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" Height="{Binding BattlegroundsTileHeight, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" FontSize="15" TextAlignment="Center"/>
                <local:HearthstoneTextBlock x:Name="BattlegroundsTurnText7" Margin="-2 1 0 0" Width="{Binding BattlegroundsTileWidth, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" Height="{Binding BattlegroundsTileHeight, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}" FontSize="15" FontStretch="UltraCondensed" TextAlignment="Center" TextTrimming="CharacterEllipsis"/>

                <StackPanel Name="BattlegroundsSessionStackPanel" Width="auto" Height="auto"
                            Visibility="Collapsed" anim:FadeAnimation.Visibility="Collapsed"
                            anim:FadeAnimation.Direction="Down" anim:FadeAnimation.Distance="20" anim:FadeAnimation.Duration="0:0:0.2">
                    <battlegroundsSession:BattlegroundsSession
                        x:Name="BattlegroundsSession"
                        DataContext="{Binding BattlegroundsSessionViewModelVM, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}"
                        CornerRadius="5"
                        FinalBoardTooltip="true"
                    />
                </StackPanel>
                <StackPanel Name="BgsTopBar" Visibility="Collapsed" Orientation="Horizontal" Canvas.Top="0" Canvas.Right="0">
                    <overlay:TurnCounter x:Name="TurnCounter" Margin="0,0,2,0"  Height="55" VerticalAlignment="Top" />
                    <minions:BattlegroundsMinions
                        x:Name="BattlegroundsMinionsPanel"
                        DataContext="{Binding BattlegroundsMinionsVM, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}"
                    />
                </StackPanel>
                <overlay:BobsBuddyPanel x:Name="BobsBuddyDisplay" Visibility="Collapsed"/>
                <StackPanel Width="1000" Name="BgsOpponentInfoContainer" Canvas.Top="0" Canvas.Right="0">
                    <battlegrounds:BattlegroundsOpponentInfo x:Name="BgsOpponentInfo" Visibility="Collapsed"/>
                </StackPanel>
                <overlay:BattlegroundsHeroPanel x:Name="HeroNotificationPanel" Visibility="Collapsed" Canvas.Right="0"/>
                <overlay:MulliganPanel x:Name="MulliganNotificationPanel" Visibility="Collapsed" Canvas.Right="0"/>

                <mercenaries:MercenariesTaskListButton x:Name="MercenariesTaskListButton" Visibility="Collapsed" Canvas.Bottom="8" Canvas.Right="8"
                    ext:OverlayExtensions.IsOverlayHoverVisible="True" MouseEnter="MercenariesTaskListButton_MouseEnter" MouseLeave="MercenariesTaskListButton_MouseLeave"
                    DataContext="{Binding MercenariesTaskListVM, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}"/>
                <mercenaries:MercenariesTaskListView x:Name="MercenariesTaskList" Visibility="Collapsed" Canvas.Bottom="58" Canvas.Right="8"
                    DataContext="{Binding MercenariesTaskListVM, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}"/>

                <heroPicking:BattlegroundsHeroPicking
                    x:Name="BattlegroundsHeroPicking"
                    DataContext="{Binding BattlegroundsHeroPickingViewModel, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}"
                />
                <battlegrounds:BattlegroundsQuestPicking
                    x:Name="BattlegroundsQuestPicking"
                    DataContext="{Binding BattlegroundsQuestPickingViewModel, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}"
                />
                <battlegroundsTrinkets:BattlegroundsTrinketPicking
                    x:Name="BattlegroundsTrinketPicking"
                    DataContext="{Binding BattlegroundsTrinketPickingViewModel, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}"
                />
                <mulligan:ConstructedMulliganGuide
                    x:Name="ConstructedMulliganGuide"
                    DataContext="{Binding ConstructedMulliganGuideViewModel, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}"
                />
                <mulligan:ConstructedMulliganGuidePreLobby
                    x:Name="ConstructedMulliganGuidePreLobby"
                    Canvas.Top="0" Canvas.Left="0"
                    DataContext="{Binding ConstructedMulliganGuidePreLobbyViewModel, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}"
                />

                <tier7:Tier7PreLobby x:Name="Tier7PreLobby" Canvas.Top="0" Canvas.Left="0" Visibility="Collapsed" ext:OverlayExtensions.IsOverlayHitTestVisible="True"
                                     DataContext="{Binding Tier7PreLobbyViewModel, RelativeSource={RelativeSource AncestorType=windows:OverlayWindow}}"/>

                    <!-- The tooltip needs to stay the bottom item to ensure they are always rendered on top -->
                <controls:GridCardImages x:Name="ToolTipGridCards" Visibility="Hidden" Panel.ZIndex="11"/>
                <controls:CardImage x:Name="ToolTipCardBlock" Visibility="Hidden" />
                <controls:CardImage x:Name="ToolTipCardBlock2" Visibility="Hidden" />
            </Canvas>
        </Border>
    </Grid>
</Window>
