<ResourceDictionary
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:system="clr-namespace:System"
  xmlns:noesis="clr-namespace:NoesisGUIExtensions"
  xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
  mc:Ignorable="d">
  <ResourceDictionary.MergedDictionaries>
    <ResourceDictionary Source="UI/Resources/Typography.xaml"/>
    <ResourceDictionary Source="UI/Resources/Swatches.xaml"/>
    <ResourceDictionary Source="UI/Resources/Buttons.xaml"/>
  </ResourceDictionary.MergedDictionaries>
  <ControlTemplate x:Key="ContentControl_Header_BottomDivider_Template" TargetType="ContentControl">
    <Grid x:Name="Master_Grid" ClipToBounds="True">
      <Grid x:Name="Layout_Grid">
        <Grid.ColumnDefinitions>
          <ColumnDefinition/>
          <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <ContentControl x:Name="LeftHalf_ContentControl" Template="{DynamicResource ContentControl_Header_BottomDivider_LeftHalf_Template}">
          <ContentControl.Background>
            <SolidColorBrush Color="{DynamicResource Key_Drk}"/>
          </ContentControl.Background>
        </ContentControl>
        <ContentControl x:Name="RightHalf_ContentControl" Content="ContentControl" Grid.Column="1" Template="{DynamicResource ContentControl_Header_BottomDivider_LeftHalf_Template}">
          <ContentControl.LayoutTransform>
            <TransformGroup>
              <ScaleTransform ScaleX="-1"/>
              <SkewTransform/>
              <RotateTransform/>
              <TranslateTransform/>
            </TransformGroup>
          </ContentControl.LayoutTransform>
          <ContentControl.Background>
            <SolidColorBrush Color="{DynamicResource Key_Drk}"/>
          </ContentControl.Background>
        </ContentControl>
        <Path x:Name="Arrow_Path" RenderTransformOrigin="0.5,0.5" Data="M12,20.7846 6,10.3923 0,0 12,0 24,1.90735e-06 18,10.3923 12,20.7846z" Stretch="Uniform" Width="23.999998" Grid.ColumnSpan="2" HorizontalAlignment="Center" VerticalAlignment="Center">
          <Path.Fill>
            <SolidColorBrush Color="{DynamicResource Light}"/>
          </Path.Fill>
        </Path>
      </Grid>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="ContentControl_Header_BottomDivider_LeftHalf_Template" TargetType="ContentControl">
    <Grid x:Name="Master_Grid">
      <Grid x:Name="Layout_Grid" Margin="0,0,32,0">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="40"/>
          <ColumnDefinition/>
          <ColumnDefinition/>
          <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <Border x:Name="Notch_Edge_Border" RenderTransformOrigin="0.5,0.5" Background="{Binding Path=Background, RelativeSource={RelativeSource TemplatedParent}}">
          <Border.RenderTransform>
            <TransformGroup>
              <ScaleTransform/>
              <SkewTransform AngleX="-32"/>
              <RotateTransform/>
              <TranslateTransform X="-16"/>
            </TransformGroup>
          </Border.RenderTransform>
        </Border>
        <Border x:Name="Backer_LeftSlant_Border" RenderTransformOrigin="0.5,0.5" Grid.Column="1" Grid.ColumnSpan="2" Background="{Binding Path=Background, RelativeSource={RelativeSource TemplatedParent}}">
          <Border.RenderTransform>
            <TransformGroup>
              <ScaleTransform/>
              <SkewTransform AngleX="-32"/>
              <RotateTransform/>
              <TranslateTransform/>
            </TransformGroup>
          </Border.RenderTransform>
        </Border>
        <Border x:Name="Backer_RightSlant_Border" RenderTransformOrigin="0.5,0.5" Grid.Column="2" Grid.ColumnSpan="2" Background="{Binding Path=Background, RelativeSource={RelativeSource TemplatedParent}}">
          <Border.RenderTransform>
            <TransformGroup>
              <ScaleTransform/>
              <SkewTransform AngleX="32"/>
              <RotateTransform/>
              <TranslateTransform/>
            </TransformGroup>
          </Border.RenderTransform>
        </Border>
      </Grid>
    </Grid>
  </ControlTemplate>
  <ItemsPanelTemplate x:Key="ListBox_ItemsPanel_Carousel_Template">
    <StackPanel Orientation="Horizontal"/>
  </ItemsPanelTemplate>
  <ControlTemplate x:Key="ListBox_Carousel_Template" TargetType="ListBox">
    <ScrollViewer ScrollViewer.CanContentRenderOutsideBounds="True" Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Template="{DynamicResource ScrollViewer_Carousel_Template}" Focusable="False">
      <ItemsPresenter/>
    </ScrollViewer>
  </ControlTemplate>
  <Style x:Key="ListBox_ItemContainer_Carousel_Style" TargetType="ListBoxItem" BasedOn="{StaticResource {x:Type ListBoxItem}}">
    <Setter Property="Template" Value="{DynamicResource ListBox_ItemsContainer_Carousel_Template}"/>
  </Style>
  <ControlTemplate x:Key="ListBox_ItemsContainer_Carousel_Template" TargetType="ListBoxItem">
    <Grid x:Name="Master_Grid" RenderTransformOrigin="0.5,0.5">
      <Grid.RenderTransform>
        <TransformGroup>
          <ScaleTransform ScaleX="0.9" ScaleY="0.9"/>
          <SkewTransform/>
          <RotateTransform/>
          <TranslateTransform/>
        </TransformGroup>
      </Grid.RenderTransform>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="SelectionStates">
          <VisualStateGroup.Transitions>
            <VisualTransition GeneratedDuration="00:00:00.2500000"/>
          </VisualStateGroup.Transitions>
          <VisualState x:Name="Unselected"/>
          <VisualState x:Name="Selected">
            <Storyboard>
              <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Master_Grid" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                <LinearDoubleKeyFrame KeyTime="00:00:00" Value="1.05"/>
              </DoubleAnimationUsingKeyFrames>
              <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Master_Grid" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                <LinearDoubleKeyFrame KeyTime="00:00:00" Value="1.05"/>
              </DoubleAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="SelectedUnfocused"/>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="Layout_Grid">
        <Grid.RowDefinitions>
          <RowDefinition Height="1*"/>
          <RowDefinition Height="10*"/>
          <RowDefinition Height="1*"/>
        </Grid.RowDefinitions>
        <Grid x:Name="Capsule_Grid" Row="1">
          <Border x:Name="CapsuleOutline_Border" Padding="4,4,4,4" BorderThickness="4,4,4,4" CornerRadius="160,160,160,160">
            <Border.BorderBrush>
              <SolidColorBrush Color="{DynamicResource Key_Brt}"/>
            </Border.BorderBrush>
            <ContentPresenter/>
          </Border>
        </Grid>
        <Grid x:Name="Shadow_Grid" Height="32" Row="2" VerticalAlignment="Bottom">
          <Ellipse Height="32">
            <Ellipse.Fill>
              <SolidColorBrush Color="{DynamicResource Dark}"/>
            </Ellipse.Fill>
            <Ellipse.Effect>
              <BlurEffect Radius="16"/>
            </Ellipse.Effect>
          </Ellipse>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <Trigger Property="IsSelected" Value="True">
        <Setter TargetName="Master_Grid" Property="Background" Value="#FF4682B4"/>
      </Trigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="Master_Grid" Property="Background" Value="#FF778899"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <DataTemplate x:Key="ListBox_Item_Carousel_Template">
    <Grid x:Name="Master_Grid" Width="320">
      <Grid x:Name="MissionImage_Grid">
        <Border x:Name="MissionImage_Border" CornerRadius="160,160,160,160">
          <Border.Background>
            <ImageBrush ImageSource="UI/Assets/SubjectImagery_Bitmap/SubjectImagery_04.png" Stretch="UniformToFill"/>
          </Border.Background>
        </Border>
      </Grid>
      <Grid x:Name="MissionTitle_Grid">
        <StackPanel x:Name="MissionTitle_VerticalStack" HorizontalAlignment="Center" VerticalAlignment="Center">
          <Grid x:Name="MissionPrefix_Grid" Margin="0,0,0,8" HorizontalAlignment="Center" VerticalAlignment="Center">
            <Border x:Name="MissionPrefix_Backer_Border">
              <Border.Background>
                <SolidColorBrush Color="{DynamicResource Key_Drk}"/>
              </Border.Background>
              <TextBlock x:Name="MissionPrefix_TextBlock" Text="THE" Margin="2,0,2,2" HorizontalAlignment="Center" VerticalAlignment="Center" Padding="0,-16,0,-16" FontFamily="{DynamicResource Font_Primary}" FontSize="{DynamicResource TextSize_48}" TextAlignment="Center">
                <TextBlock.Foreground>
                  <SolidColorBrush Color="{DynamicResource Light}"/>
                </TextBlock.Foreground>
              </TextBlock>
            </Border>
          </Grid>
          <Grid x:Name="MissionName_Grid">
            <StackPanel x:Name="MissionName_VerticalStack">
              <Border x:Name="MissionName_OverUnderLines_Border" Padding="0,8,0,8" BorderThickness="0,4,0,4">
                <Border.BorderBrush>
                  <SolidColorBrush Color="{DynamicResource Light}"/>
                </Border.BorderBrush>
                <Border x:Name="MissionName_Backer_Border">
                  <Border.Background>
                    <SolidColorBrush Color="{DynamicResource Key_Drk}"/>
                  </Border.Background>
                  <TextBlock x:Name="MissionName_TextBlock" Margin="4,0,4,0" FontFamily="{DynamicResource Font_Primary}" FontSize="{DynamicResource TextSize_64}" TextAlignment="Center">
                    <TextBlock.Foreground>
                      <SolidColorBrush Color="{DynamicResource Light}"/>
                    </TextBlock.Foreground>
                    <TextBlock.Text>
                      <Binding>
                        <Binding.Converter>
                          <noesis:CaseConverter/>
                        </Binding.Converter>
                      </Binding>
                    </TextBlock.Text>
                  </TextBlock>
                </Border>
              </Border>
            </StackPanel>
          </Grid>
        </StackPanel>
      </Grid>
      <Grid x:Name="MissionAvailability_Grid" Margin="0,0,0,32" VerticalAlignment="Bottom">
        <Border x:Name="IconBacker_Border" Width="{Binding Path=ActualHeight, RelativeSource={RelativeSource Self}}" Height="{Binding Path=ActualHeight, ElementName=Gamertag_TextBlock}" CornerRadius="16,16,16,16">
          <Border.Background>
            <SolidColorBrush Color="{DynamicResource Key_Med}"/>
          </Border.Background>
          <Path x:Name="Icon_Lock_Path" Data="F1M191.8,135.15c-0.03,-8.76 -5.57,-16.22 -13.33,-19.1l-0.08,-25.71c-0.04,-13.48 -5.37,-26.17 -14.98,-35.72 -9.62,-9.55 -22.34,-14.8 -35.82,-14.75 -27.92,0.09 -50.56,22.88 -50.47,50.8l0.08,25.71c-7.74,2.93 -13.23,10.42 -13.2,19.18l0.2,60.2c0.04,11.26 9.18,20.37 20.43,20.37 0.02,0 0.05,0 0.07,0l86.93,-0.28c11.29,-0.04 20.41,-9.22 20.37,-20.5l-0.2,-60.2z M108.12,71c5.24,-5.27 12.18,-8.19 19.54,-8.22 0.03,0 0.06,0 0.09,0 7.33,0 14.25,2.87 19.5,8.09 5.27,5.24 8.19,12.18 8.22,19.54l0.08,24.42 -55.44,0.18 -0.08,-24.42c-0.02,-7.36 2.85,-14.32 8.09,-19.59z" Stretch="Uniform" Margin="16,16,16,16" Fill="#FFFFFFFF"/>
        </Border>
      </Grid>
    </Grid>
  </DataTemplate>
  <ControlTemplate x:Key="Button_PrevNext_Template" TargetType="Button">
    <Grid x:Name="Master_Grid" HorizontalAlignment="Center" VerticalAlignment="Center" Cursor="Hand">
      <StackPanel x:Name="ButtonStack_HorizontalStack" Orientation="Horizontal">
        <Border x:Name="Bookend_Border" Width="4" Margin="0,0,8,0">
          <Border.Background>
            <SolidColorBrush Color="{DynamicResource Key_Brt}"/>
          </Border.Background>
        </Border>
        <Grid x:Name="ContentZone_Grid" Width="{Binding Path=ActualHeight, RelativeSource={RelativeSource Self}}">
          <Border x:Name="Frame_Border" Padding="4,4,4,4" BorderThickness="4,4,4,4">
            <Border.BorderBrush>
              <SolidColorBrush Color="{DynamicResource Key_Med}"/>
            </Border.BorderBrush>
            <Border x:Name="Backer_Border">
              <Border.Background>
                <SolidColorBrush Color="{DynamicResource Key_Brt}"/>
              </Border.Background>
              <Grid x:Name="Content_Grid" Width="31.199951" Height="60.47998" HorizontalAlignment="Center" VerticalAlignment="Center">
                <TextBlock x:Name="IconSizer_TextBlock" Text="X" Visibility="Hidden" FontSize="{DynamicResource TextSize_48}" TextAlignment="Center" TextWrapping="Wrap"/>
                <noesis:Star RenderTransformOrigin="0.5,0.5" Count="3" Ratio="0.5" Stretch="UniformToFill" Height="{Binding Path=ActualWidth, ElementName=IconSizer_TextBlock}" HorizontalAlignment="Center" VerticalAlignment="Center">
                  <noesis:Star.LayoutTransform>
                    <TransformGroup>
                      <ScaleTransform/>
                      <SkewTransform/>
                      <RotateTransform/>
                      <TranslateTransform/>
                    </TransformGroup>
                  </noesis:Star.LayoutTransform>
                  <noesis:Star.RenderTransform>
                    <TransformGroup>
                      <ScaleTransform/>
                      <SkewTransform/>
                      <RotateTransform Angle="90"/>
                      <TranslateTransform X="-3"/>
                    </TransformGroup>
                  </noesis:Star.RenderTransform>
                  <noesis:Star.Fill>
                    <SolidColorBrush Color="{DynamicResource Dark}" Opacity="0.75"/>
                  </noesis:Star.Fill>
                </noesis:Star>
              </Grid>
            </Border>
          </Border>
        </Grid>
      </StackPanel>
    </Grid>
    <ControlTemplate.Triggers>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="BackgroundBorder" Property="Background" Value="#FF778899"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter TargetName="BackgroundBorder" Property="Background" Value="#FF708090"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <ControlTemplate x:Key="ContentControl_MissionDetails_Wing_Template" TargetType="ContentControl">
    <Grid x:Name="Master_Grid" Margin="0,80,0,80">
      <b:Interaction.Triggers>
        <b:DataTrigger x:Name="IfStyle=Right_FlipLayout" Binding="{Binding Path=Style, RelativeSource={RelativeSource TemplatedParent}}" Value="{DynamicResource MissionDetails_WingAndContent_Right_Style}">
          <b:ChangePropertyAction TargetName="Frame_Border" PropertyName="CornerRadius" Value="0,64,64,0"/>
          <b:ChangePropertyAction TargetName="Frame_Backer" PropertyName="CornerRadius" Value="0,56,56,0"/>
          <b:ChangePropertyAction TargetName="Content_ContentPresenter" PropertyName="Margin" Value="256,64,80,64"/>
          <b:ChangePropertyAction TargetName="Frame_Border" PropertyName="OpacityMask" Value="{DynamicResource Wing_OpacityMask_Right}"/>
        </b:DataTrigger>
      </b:Interaction.Triggers>
      <Border x:Name="Frame_Border" Padding="16,16,16,16" BorderThickness="4,4,4,4" CornerRadius="64,0,0,64" OpacityMask="{DynamicResource Wing_OpacityMask_Left}">
        <Border.BorderBrush>
          <SolidColorBrush Color="{DynamicResource Key_Brt}"/>
        </Border.BorderBrush>
        <Border x:Name="Frame_Backer" Background="{DynamicResource Dark_75}" CornerRadius="56,56,56,56"/>
      </Border>
      <ContentPresenter x:Name="Content_ContentPresenter" ContentSource="Content" Margin="80,64,256,64"/>
    </Grid>
  </ControlTemplate>
  <Style x:Key="MissionDetails_WingAndContent_Right_Style" TargetType="ContentControl" BasedOn="{StaticResource {x:Type ContentControl}}">
    <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
  </Style>
  <Style x:Key="MissionDetails_WingAndContent_Left_Style" TargetType="ContentControl" BasedOn="{StaticResource {x:Type ContentControl}}">
    <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
  </Style>
  <DataTemplate x:Key="ContentControl_Content_MissionDescription_Template">
    <Grid x:Name="Master_Grid">
      <StackPanel x:Name="Content_VerticalStack" VerticalAlignment="Center">
        <StackPanel x:Name="Description_VerticalStack">
          <TextBlock x:Name="MissionIntro_TextBlock" Text="The next chapter..." Margin="0,0,0,8" FontFamily="{DynamicResource Font_Primary}" FontSize="{DynamicResource TextSize_40}" FontStyle="Italic" TextWrapping="Wrap">
            <TextBlock.Foreground>
              <SolidColorBrush Color="{DynamicResource Light}"/>
            </TextBlock.Foreground>
          </TextBlock>
          <TextBlock x:Name="MissionDescription_TextBlock" RenderTransformOrigin="0.5,0.5" Text="The shifting sands of the Shurima Desert have uncovered the Vault of the Jackal, a subterranean tomb sealed during the First Dynasty. Deep within lies the Amulet of Duat, an artifact capable of tearing the veil between the living world and the afterlife..." FontFamily="{DynamicResource Font_Primary}" FontSize="{DynamicResource TextSize_28}" FontStyle="Italic" TextWrapping="Wrap">
            <TextBlock.Foreground>
              <SolidColorBrush Color="{DynamicResource Light}"/>
            </TextBlock.Foreground>
          </TextBlock>
        </StackPanel>
        <StackPanel x:Name="Rewards_VerticalStack" Margin="0,16,0,0">
          <TextBlock x:Name="RewardIntro_TextBlock" Text="Shall you succeed, these rewards could be yours:" Margin="0,0,0,16" FontFamily="{DynamicResource Font_Primary}" FontSize="{DynamicResource TextSize_28}" FontStyle="Italic" TextWrapping="Wrap">
            <TextBlock.Foreground>
              <SolidColorBrush Color="{DynamicResource Light}"/>
            </TextBlock.Foreground>
          </TextBlock>
          <ListBox x:Name="Rewards_ListBox" ItemContainerStyle="{DynamicResource ListBox_ItemContainer_Rewards_Style}" Template="{DynamicResource ListBox_Rewards_Template}" ItemsPanel="{DynamicResource ListBox_ItemsPanel_Rewards_Template}" ItemTemplate="{DynamicResource ListBox_Item_Reward_Template}">
            <system:String>Item #1</system:String>
            <system:String>Item #2</system:String>
            <system:String>Item #3</system:String>
            <system:String>Item #4</system:String>
            <system:String>Item #5</system:String>
            <system:String>Item #6</system:String>
            <system:String>Item #7</system:String>
            <system:String>Item #8</system:String>
            <system:String>Item #9</system:String>
            <system:String>Item #10</system:String>
          </ListBox>
        </StackPanel>
      </StackPanel>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ContentControl_Content_Squad_Template">
    <Grid x:Name="Master_Grid">
      <Grid x:Name="Content_Grid">
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto"/>
          <RowDefinition/>
          <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Grid x:Name="Header_Grid">
          <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition/>
          </Grid.ColumnDefinitions>
          <TextBlock x:Name="Header_TextBlock" Text="Squad" HorizontalAlignment="Left" FontFamily="{DynamicResource Font_Primary}" FontSize="{DynamicResource TextSize_40}">
            <TextBlock.Foreground>
              <SolidColorBrush Color="{DynamicResource Light}"/>
            </TextBlock.Foreground>
          </TextBlock>
          <TextBlock x:Name="Count_TextBlock" Text="3/4" Grid.Column="1" HorizontalAlignment="Right" FontFamily="{DynamicResource Font_Primary}" FontSize="{DynamicResource TextSize_40}" TextAlignment="Right">
            <TextBlock.Foreground>
              <SolidColorBrush Color="{DynamicResource Light}"/>
            </TextBlock.Foreground>
          </TextBlock>
        </Grid>
        <ListBox x:Name="PlayerList_ListBox" Margin="0,0,0,8" Grid.Row="1" ItemContainerStyle="{DynamicResource ListBox_ItemContainer_PlayerList_Style}" Template="{DynamicResource ListBox_PlayerList_Template}" ItemsPanel="{DynamicResource ListBox_ItemsPanel_PlayerList_Template}" ItemTemplate="{DynamicResource ListBox_Item_PlayerList_Player_Template}">
          <system:String>Item #1</system:String>
          <system:String>Item #2</system:String>
          <system:String>Item #3</system:String>
          <system:String>Item #4</system:String>
          <system:String>Item #5</system:String>
          <system:String>Item #6</system:String>
          <system:String>Item #7</system:String>
          <system:String>Item #8</system:String>
          <system:String>Item #9</system:String>
          <system:String>Item #10</system:String>
        </ListBox>
        <Button Content="Button" Grid.Row="2" Template="{DynamicResource Button_LaunchMission_Button_Template}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <ControlTemplate x:Key="ListBox_Rewards_Template" TargetType="ListBox">
    <WrapPanel Orientation="Horizontal" HorizontalAlignment="Left">
      <ItemsPresenter/>
    </WrapPanel>
  </ControlTemplate>
  <ItemsPanelTemplate x:Key="ListBox_ItemsPanel_Rewards_Template">
    <StackPanel Orientation="Horizontal"/>
  </ItemsPanelTemplate>
  <Style x:Key="ListBox_ItemContainer_Rewards_Style" TargetType="ListBoxItem" BasedOn="{StaticResource {x:Type ListBoxItem}}">
    <Setter Property="Template" Value="{DynamicResource ListBox_ItemContainer_Rewards_Template}"/>
  </Style>
  <ControlTemplate x:Key="ListBox_ItemContainer_Rewards_Template" TargetType="ListBoxItem">
    <Grid x:Name="Master_Grid" Margin="0,0,8,0">
      <Grid.ToolTip>
        <ToolTip Content="Tooltip Text" Template="{DynamicResource ToolTip_Reward_Template}" ContentTemplate="{DynamicResource ToolTip_Content_Reward_Template}"/>
      </Grid.ToolTip>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="CommonStates">
          <VisualState x:Name="Normal"/>
          <VisualState x:Name="MouseOver">
            <Storyboard>
              <ColorAnimationUsingKeyFrames Storyboard.TargetName="Frame_Border" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)">
                <LinearColorKeyFrame KeyTime="00:00:00" Value="{DynamicResource Accent}"/>
              </ColorAnimationUsingKeyFrames>
              <ColorAnimationUsingKeyFrames Storyboard.TargetName="Backer_Border" Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)">
                <LinearColorKeyFrame KeyTime="00:00:00" Value="{DynamicResource Key_Med}"/>
              </ColorAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Disabled"/>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Border x:Name="HitBox_Border">
        <Border.Background>
          <SolidColorBrush Color="{DynamicResource Color_Transparent}"/>
        </Border.Background>
      </Border>
      <Border x:Name="Frame_Border" Padding="4,4,4,4" BorderThickness="4,4,4,4" CornerRadius="8,8,8,8">
        <Border.BorderBrush>
          <SolidColorBrush Color="{DynamicResource Key_Brt}"/>
        </Border.BorderBrush>
        <Border x:Name="Backer_Border" CornerRadius="4,4,4,4">
          <Border.Background>
            <SolidColorBrush Color="{DynamicResource Key_Drk}"/>
          </Border.Background>
          <Grid x:Name="Content_Grid" HorizontalAlignment="Center" VerticalAlignment="Center">
            <TextBlock x:Name="IconSizer_TextBlock" Text="X" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Hidden" FontSize="{DynamicResource TextSize_48}" TextWrapping="Wrap"/>
            <ContentPresenter Width="{Binding Path=ActualHeight, RelativeSource={RelativeSource Self}}" Margin="8,8,8,8"/>
          </Grid>
        </Border>
      </Border>
    </Grid>
  </ControlTemplate>
  <DataTemplate x:Key="ListBox_Item_Reward_Template">
    <Grid x:Name="Grid_Master">
      <Border x:Name="Icon_Border">
        <Border.Background>
          <ImageBrush ImageSource="UI/Assets/Iconography_Bitmap/Iconography_Bitmap_Coral.png" Stretch="Uniform"/>
        </Border.Background>
      </Border>
    </Grid>
  </DataTemplate>
  <ControlTemplate x:Key="ToolTip_Reward_Template" TargetType="ToolTip">
    <Grid x:Name="Master_Grid">
      <Border x:Name="Backer_Border" CornerRadius="4,4,4,4">
        <Border.Background>
          <SolidColorBrush Color="{DynamicResource Key_Drk}"/>
        </Border.Background>
        <ContentPresenter ContentSource="Content"/>
      </Border>
    </Grid>
  </ControlTemplate>
  <DataTemplate x:Key="ToolTip_Content_Reward_Template">
    <Grid x:Name="Master_Grid">
      <TextBlock x:Name="Label_TextBlock" Text="{Binding}" Margin="8,0,8,2" FontFamily="{DynamicResource Font_Primary}" FontSize="{DynamicResource TextSize_24}">
        <TextBlock.Foreground>
          <SolidColorBrush Color="{DynamicResource Accent}"/>
        </TextBlock.Foreground>
      </TextBlock>
    </Grid>
  </DataTemplate>
  <ControlTemplate x:Key="ScrollViewer_Carousel_Template" TargetType="ScrollViewer">
    <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="1*"/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
          <RowDefinition Height="1*"/>
          <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <ScrollContentPresenter CanContentScroll="{TemplateBinding CanContentScroll}" Margin="{TemplateBinding Padding}"/>
        <ScrollBar x:Name="PART_HorizontalScrollBar" Value="{Binding Path=HorizontalOffset, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" Maximum="{TemplateBinding ScrollableWidth}" Orientation="Horizontal" ViewportSize="{TemplateBinding ViewportWidth}" Margin="2" Grid.Column="0" Grid.Row="1" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"/>
        <ScrollBar x:Name="PART_VerticalScrollBar" Value="{Binding Path=VerticalOffset, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" Maximum="{TemplateBinding ScrollableHeight}" Orientation="Vertical" ViewportSize="{TemplateBinding ViewportHeight}" Margin="2" Grid.Column="1" Grid.Row="0" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"/>
      </Grid>
    </Border>
  </ControlTemplate>
  <ControlTemplate x:Key="ListBox_PlayerList_Template" TargetType="ListBox">
    <ScrollViewer Template="{DynamicResource ScrollViewer_PlayerList_Template}" Focusable="False">
      <ItemsPresenter/>
    </ScrollViewer>
  </ControlTemplate>
  <DataTemplate x:Key="ListBox_Item_PlayerList_Player_Template">
    <Grid x:Name="Master_Grid"/>
  </DataTemplate>
  <Style x:Key="ListBox_ItemContainer_PlayerList_Style" TargetType="ListBoxItem" BasedOn="{StaticResource {x:Type ListBoxItem}}">
    <Setter Property="Template" Value="{DynamicResource ListBox_ItemContainer_PlayerList_Template}"/>
    <Setter Property="noesis:StyleInteraction.Triggers">
      <Setter.Value>
        <noesis:StyleTriggerCollection>
          <b:DataTrigger/>
        </noesis:StyleTriggerCollection>
      </Setter.Value>
    </Setter>
    <Setter Property="Margin" Value="0,2,0,2"/>
  </Style>
  <ControlTemplate x:Key="ListBox_ItemContainer_PlayerList_Template" TargetType="ListBoxItem">
    <Grid x:Name="Master_Grid" Margin="{Binding Path=Margin, RelativeSource={RelativeSource TemplatedParent}}">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="CommonStates">
          <VisualState x:Name="Normal"/>
          <VisualState x:Name="MouseOver">
            <Storyboard>
              <ColorAnimationUsingKeyFrames Storyboard.TargetName="Avatar_Backer_Border" Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)">
                <LinearColorKeyFrame KeyTime="00:00:00" Value="{DynamicResource Key_Med}"/>
              </ColorAnimationUsingKeyFrames>
              <ColorAnimationUsingKeyFrames Storyboard.TargetName="Gamertag_Backer_Border" Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)">
                <LinearColorKeyFrame KeyTime="00:00:00" Value="{DynamicResource Key_Med}"/>
              </ColorAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Disabled"/>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Border x:Name="HitBox_Border">
        <Border.Background>
          <SolidColorBrush Color="{DynamicResource Color_Transparent}"/>
        </Border.Background>
      </Border>
      <Grid x:Name="Layout_Grid">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="1*"/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid x:Name="Avatar_Grid" Margin="0,0,8,0">
          <Border x:Name="Avatar_Backer_Border">
            <Border.Background>
              <SolidColorBrush Color="{DynamicResource Key_Drk}"/>
            </Border.Background>
          </Border>
          <Border x:Name="Avatar_Image_Border" Width="{Binding Path=ActualHeight, ElementName=PlayerName_TextBlock}" Margin="0,-4,0,0">
            <Border.Background>
              <ImageBrush Stretch="UniformToFill" ImageSource="/GAME;component/UI/Assets/AvatarImagery_Bitmap/AvatarImagery_1.png"/>
            </Border.Background>
          </Border>
        </Grid>
        <Grid x:Name="Gamertag_Grid" Margin="0" Column="1">
          <Border x:Name="Gamertag_Backer_Border">
            <Border.Background>
              <SolidColorBrush Color="{DynamicResource Key_Drk}"/>
            </Border.Background>
          </Border>
          <TextBlock x:Name="PlayerName_TextBlock" Text="{Binding}" Margin="16,0,16,0" FontFamily="{DynamicResource Font_Primary}" FontSize="{DynamicResource TextSize_32}">
            <TextBlock.Foreground>
              <SolidColorBrush Color="#FFFFE5CC"/>
            </TextBlock.Foreground>
          </TextBlock>
        </Grid>
        <Grid x:Name="Player_Action_Button_Grid" Margin="8,0,0,0" Grid.Column="2">
          <CheckBox x:Name="Player_Action_CheckBox" Content="CheckBox" Template="{DynamicResource CheckBox_Player_Action_Template}"/>
        </Grid>
      </Grid>
      <ContentPresenter/>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiDataTrigger x:Name="IfActionButtonIsChecked_ChangePlayerColour">
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsChecked, ElementName=Player_Action_CheckBox}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="PlayerName_TextBlock" Property="Foreground">
          <Setter.Value>
            <SolidColorBrush Color="{DynamicResource Accent}"/>
          </Setter.Value>
        </Setter>
      </MultiDataTrigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <ItemsPanelTemplate x:Key="ListBox_ItemsPanel_PlayerList_Template">
    <StackPanel Margin="0,0,8,0"/>
  </ItemsPanelTemplate>
  <ControlTemplate x:Key="ScrollViewer_PlayerList_Template" TargetType="ScrollViewer">
    <Grid x:Name="Master_Grid">
      <Grid x:Name="Layout_Grid">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="1*"/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
          <RowDefinition Height="1*"/>
          <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Border x:Name="Scrollbar_Trough_Border" Grid.Column="1" Grid.RowSpan="2" CornerRadius="8,8,8,8">
          <Border.Background>
            <SolidColorBrush Color="{DynamicResource Key_Drk}"/>
          </Border.Background>
        </Border>
        <ScrollContentPresenter CanContentScroll="{TemplateBinding CanContentScroll}"/>
        <ScrollBar x:Name="PART_HorizontalScrollBar" Value="{Binding Path=HorizontalOffset, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" Maximum="{TemplateBinding ScrollableWidth}" Orientation="Horizontal" ViewportSize="{TemplateBinding ViewportWidth}" Margin="2" Grid.Column="0" Grid.Row="1" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"/>
        <ScrollBar x:Name="PART_VerticalScrollBar" Value="{Binding Path=VerticalOffset, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" Maximum="{TemplateBinding ScrollableHeight}" Orientation="Vertical" ViewportSize="{TemplateBinding ViewportHeight}" Grid.Column="1" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Template="{DynamicResource ScrollViewer_ScrollBar_Template}"/>
      </Grid>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="ScrollViewer_ScrollBar_Template" TargetType="ScrollBar">
    <ControlTemplate.Resources>
      <Style x:Key="PageButtonStyle" TargetType="RepeatButton">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Focusable" Value="False"/>
        <Setter Property="ClickMode" Value="Press"/>
        <Setter Property="Delay" Value="250"/>
        <Setter Property="Interval" Value="100"/>
        <Setter Property="Template">
          <Setter.Value>
            <ControlTemplate TargetType="RepeatButton">
              <Border Background="#00FFFFFF"/>
            </ControlTemplate>
          </Setter.Value>
        </Setter>
      </Style>
      <Style x:Key="ThumbStyle" TargetType="Thumb">
        <Setter Property="Template">
          <Setter.Value>
            <ControlTemplate TargetType="Thumb">
              <Border x:Name="Thumb" Background="#FF2F3F4F" CornerRadius="5,5,5,5"/>
              <ControlTemplate.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                  <Setter TargetName="Thumb" Property="Background" Value="#FF778899"/>
                </Trigger>
                <Trigger Property="IsDragging" Value="True">
                  <Setter TargetName="Thumb" Property="Background" Value="#FF708090"/>
                </Trigger>
              </ControlTemplate.Triggers>
            </ControlTemplate>
          </Setter.Value>
        </Setter>
      </Style>
    </ControlTemplate.Resources>
    <Track x:Name="PART_Track">
      <Track.Thumb>
        <Thumb x:Name="Thumb" Width="8" Height="10" Margin="4,4,4,4" Style="{StaticResource ThumbStyle}" Template="{DynamicResource ScrollViewer_ScrollBar_Thumb_Template}"/>
      </Track.Thumb>
      <Track.DecreaseRepeatButton>
        <RepeatButton x:Name="DecreaseButton" Command="ScrollBar.PageLeftCommand" Style="{StaticResource PageButtonStyle}"/>
      </Track.DecreaseRepeatButton>
      <Track.IncreaseRepeatButton>
        <RepeatButton x:Name="IncreaseButton" Command="ScrollBar.PageRightCommand" Style="{StaticResource PageButtonStyle}"/>
      </Track.IncreaseRepeatButton>
    </Track>
    <ControlTemplate.Triggers>
      <Trigger Property="Orientation" Value="Vertical">
        <Setter TargetName="PART_Track" Property="IsDirectionReversed" Value="True"/>
        <Setter TargetName="Thumb" Property="Height" Value="Auto"/>
        <Setter TargetName="DecreaseButton" Property="Command" Value="ScrollBar.PageUpCommand"/>
        <Setter TargetName="IncreaseButton" Property="Command" Value="ScrollBar.PageDownCommand"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <ControlTemplate x:Key="ScrollViewer_ScrollBar_Thumb_Template" TargetType="Thumb">
    <Border x:Name="Thumb" CornerRadius="4,4,4,4">
      <Border.Background>
        <SolidColorBrush Color="{DynamicResource Light}"/>
      </Border.Background>
    </Border>
    <ControlTemplate.Triggers>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="Thumb" Property="Background" Value="#FF778899"/>
      </Trigger>
      <Trigger Property="IsDragging" Value="True">
        <Setter TargetName="Thumb" Property="Background" Value="#FF708090"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
</ResourceDictionary>