<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:System="clr-namespace:System;assembly=mscorlib"
      xmlns:local="clr-namespace:ForzaUI;assembly="
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      xmlns:devonly="http://schemas.playground-games.com/xaml/devonly"
      devonly:DevOnly="devonly"
      x:Class="ForzaUI.A_BatchRewardsPopup"
      x:Name="page"
      Style="{StaticResource A_Style_Page_Generic}"
      DataContext="{Binding RelativeSource={x:Static RelativeSource.Self}}">
    <Page.Resources>
        <DataTemplate x:Key="H_Template_CollectionCampaignItem">
            <Grid>
                <FZMaterial Color="{StaticResource H_Color_Primary_White}"
                            Preset="{Roundtangle CornerRadius=5}" />
                <DockPanel>
                    <Grid Width="372"
                          Height="210"
                          Margin="12,12,12,0"
                          DockPanel.Dock="Top">
                        <FZMaterial ImageSource="{Binding CampaignId, ElementName=page, Converter={StaticResource H_Converter_CampaignToItemTexture}}"
                                    x:Name="icon_texture"
                                    GreedyMeasure="True"
                                    Stretch="Uniform" />
                        <Grid x:Name="currency"
                              Height="26"
                              Margin="10"
                              VerticalAlignment="Bottom"
                              HorizontalAlignment="Left">
                            <FZMaterial Color="Black"
                                        Preset="{Roundtangle CornerRadius=13}" />
                            <FZTextBlock Margin="8,0"
                                         VerticalAlignment="Center"
                                         CapHeight="14">
                                <FZRun Text="{Binding Currency}"
                                       Color="{StaticResource H_Color_Primary_White}" />
                                <FZRun Text=" fp"
                                       Color="{StaticResource H_Color_Primary_Green}" />
                            </FZTextBlock>
                        </Grid>
                        <FZMaterial x:Name="tick"
                                    Visibility="Hidden"
                                    GetSizeFromTexture="True"
                                    HorizontalAlignment="Left"
                                    VerticalAlignment="Bottom"
                                    ImageSource="game:\Media\UI\Textures\Data_Bound\CollectionCampaign\Info_Gold_Tick.png" />
                    </Grid>
                    <StackPanel HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Margin="12,0">
                        <Decorator HorizontalAlignment="Center">
                            <FZTextBlock Text="{Binding Title}"
                                         x:Name="title"
                                         HorizontalAlignment="Stretch"
                                         Color="{StaticResource H_Color_Primary_Black}"
                                         TextTrimming="None"
                                         FontFamily="Horizon_A"
                                         Stretch="None"
                                         TextWrapping="NoWrap"
                                         AutoScroll="{StaticResource A_AutoScrollSettings_Collection}"
                                         AutoScroll.AllowScrolling="True"
                                         CapHeight="21" />
                        </Decorator>
                        <Decorator HorizontalAlignment="Center">
                            <FZTextBlock Text="{Binding Subtitle}"
                                         x:Name="subtitle"
                                         Color="{StaticResource H_Color_Grey}"
                                         FontFamily="Horizon_A"
                                         TextTrimming="None"
                                         Stretch="None"
                                         TextWrapping="NoWrap"
                                         HorizontalAlignment="Stretch"
                                         CapHeight="15"
                                         AutoScroll="{StaticResource A_AutoScrollSettings_Collection}"
                                         AutoScroll.AllowScrolling="True" />
                        </Decorator>
                    </StackPanel>
                </DockPanel>
            </Grid>
            <DataTemplate.Triggers>
                <DataTrigger Binding="{Binding Path=(Selector.IsSelected), RelativeSource={RelativeSource AncestorType=ListBoxItem}}"
                             Value="True">
                    <Setter TargetName="title"
                            Property="TextTrimming"
                            Value="None" />
                    <Setter TargetName="title"
                            Property="AutoScroll.AllowScrolling"
                            Value="True" />
                    <Setter TargetName="subtitle"
                            Property="TextTrimming"
                            Value="None" />
                    <Setter TargetName="subtitle"
                            Property="AutoScroll.AllowScrolling"
                            Value="True" />
                </DataTrigger>
                <DataTrigger Binding="{Binding Complete}"
                             Value="True">
                    <Setter TargetName="icon_texture"
                            Property="ImageSource"
                            Value="{Binding IconPath}" />
                    <Setter TargetName="currency"
                            Property="Visibility"
                            Value="Collapsed" />
                    <Setter TargetName="tick"
                            Property="Visibility"
                            Value="Visible" />
                </DataTrigger>
                <DataTrigger Binding="{Binding Subtitle, Converter={StringVisConverter}}"
                             Value="{x:Static Visibility.Visible}">
                    <Setter TargetName="title"
                            Property="CapHeight"
                            Value="19" />
                </DataTrigger>
            </DataTemplate.Triggers>
        </DataTemplate>
        <Style x:Key="H_Run_InfoDescriptionHighlight"
               TargetType="FZRun">
            <Setter Property="Color"
                    Value="{StaticResource H_Color_Primary_Yellow}" />
        </Style>
        <MappingConverter x:Key="H_Converter_InfoDescription">
            <MappingConverterEntry Key="{NoCase highlight}"
                                   Value="{StaticResource H_Run_InfoDescriptionHighlight}" />
        </MappingConverter>
        <Thickness x:Key="H_Thickness_Invert">-1</Thickness>
        <ControlTemplate x:Key="H_Template_LeftRightButton"
                         TargetType="FZButton">
            <Grid Width="56"
                  Height="56">
                <Viewbox Margin="-5"
                         x:Name="stroke"
                         Visibility="Collapsed"
                         IsHitTestVisible="False">
                    <FZMaterial Width="56"
                                Height="56"
                                Preset="{RoundtangleStroke CornerRadius=28, Thickness=6}"
                                Color="{StaticResource H_Color_Primary_White}" />
                </Viewbox>
                <FZMaterial Color="{Binding CampaignId, Converter={StaticResource H_Converter_CampaignToColour}}"
                            ImageSource="game:\Media\UI\Textures\Data_Bound\CollectionCampaign\Arrow_Icon.png" />
            </Grid>
            <ControlTemplate.Triggers>
                <Trigger Property="IsMouseOver"
                         Value="True">
                    <Setter TargetName="stroke"
                            Property="Visibility"
                            Value="Visible" />
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>
        <MappingConverter x:Key="H_Converter_CampaignToBackground"
                          Default="game:\Media\UI\Textures\Data_Bound\CollectionCampaign\Claim_Reward_Background.png">
            <MappingConverterEntry Key="{StaticResource H_Id_DiscoverCampaign}"
                                   Value="game:\Media\UI\Textures\Data_Bound\CollectionCampaign\Claim_Reward_Background_Discover.png" />
            <MappingConverterEntry Key="{StaticResource H_Id_FestivalCampaign}"
                                   Value="game:\Media\UI\Textures\Data_Bound\CollectionCampaign\Claim_Reward_Background_Festival.png" />
        </MappingConverter>
        <MappingConverter x:Key="H_Converter_CampaignToGiftIcon"
                          Default="">
            <MappingConverterEntry Key="{StaticResource H_Id_DiscoverCampaign}"
                                   Value="game:\Media\UI\Textures\Data_Bound\CollectionCampaign\Gift_Discover.png" />
            <MappingConverterEntry Key="{StaticResource H_Id_FestivalCampaign}"
                                   Value="game:\Media\UI\Textures\Data_Bound\CollectionCampaign\Gift_Festival.png" />
        </MappingConverter>
        <MappingConverter x:Key="H_Converter_IsValidCampaign"
                          Default="{StaticResource A_Boolean_False}">
            <MappingConverterEntry Key="{StaticResource H_Id_DiscoverCampaign}" Value="{StaticResource A_Boolean_True}"/>
            <MappingConverterEntry Key="{StaticResource H_Id_FestivalCampaign}" Value="{StaticResource A_Boolean_True}"/>
        </MappingConverter>
        
        <Style x:Key="A_FZRun_Style_Highlight" TargetType="FZRun">
            <Setter Property="FontFamily" Value="Horizon_C" />
            <Setter Property="Color" Value="{StaticResource H_Color_Primary_Yellow}" />
        </Style>

        <MappingConverter x:Key="H_MarkupConverter_Subtitle_FP">
            <MappingConverterEntry Key="{NoCase highlight}" Value="{StaticResource A_FZRun_Style_Highlight}"/>
            <MappingConverterEntry Key="{NoCase currency}">
                <MappingConverterEntry.Value>
                    <Style TargetType="Control" BasedOn="{StaticResource H_Style_Control_FPIcon}"/>
                </MappingConverterEntry.Value>
            </MappingConverterEntry>
        </MappingConverter>

        <MappingConverter x:Key="H_MarkupConverter_Subtitle_DJ">
            <MappingConverterEntry Key="{NoCase highlight}" Value="{StaticResource A_FZRun_Style_Highlight}"/>
            <MappingConverterEntry Key="{NoCase currency}">
                <MappingConverterEntry.Value>
                    <Style TargetType="Control" BasedOn="{StaticResource H_Style_Control_DJIcon}"/>
                </MappingConverterEntry.Value>
            </MappingConverterEntry>
        </MappingConverter>

        <MappingConverter x:Key="H_MarkupConverter_Subtitle">
            <MappingConverterEntry Key="{StaticResource H_Id_DiscoverCampaign}" Value="{StaticResource H_MarkupConverter_Subtitle_DJ}" />
            <MappingConverterEntry Key="{StaticResource H_Id_FestivalCampaign}" Value="{StaticResource H_MarkupConverter_Subtitle_FP}" />
        </MappingConverter>

        <Duration x:Key="H_TimeSpan_NextOnDuration">0:0:0.5</Duration>
        <Duration x:Key="H_TimeSpan_NextOffDuration">0:0:1</Duration>
        <Double x:Key="H_Slide_Offset">700</Double>
        <Style x:Key="H_Style_AnimateOff">
            <Setter Property="RenderTransform"
                    Value="{TranslateTransform X={Convert {StaticResource H_Slide_Offset}, Converter={LinearTransformConverter Scale=-1}}}" />
            <Setter Property="Opacity"
                    Value="0" />
            <Style.Triggers>
                <EventTrigger RoutedEvent="Binding.TargetUpdated">
                    <BeginUIStoryboard>
                        <UIStoryboard DurationOverride="{StaticResource H_TimeSpan_NextOffDuration}"
                                      FillBehavior="Stop">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)">
                                <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                                        Value="1" />
                                <EasingDoubleKeyFrame KeyTime="0:0:0.5"
                                                      Value="0"
                                                      EasingFunction="{QuadraticEasing EasingMode=EaseIn}" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)">
                                <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                                        Value="0" />
                                <EasingDoubleKeyFrame KeyTime="0:0:1"
                                                      Value="{Convert {StaticResource H_Slide_Offset}, Converter={LinearTransformConverter Scale=-1}}"
                                                      EasingFunction="{QuadraticEasing EasingMode=EaseIn}" />
                            </DoubleAnimationUsingKeyFrames>
                        </UIStoryboard>
                    </BeginUIStoryboard>
                </EventTrigger>
            </Style.Triggers>
        </Style>
        <Style x:Key="H_Style_AnimateOn">
            <Setter Property="RenderTransform"
                    Value="{TranslateTransform X=0}" />
            <Style.Triggers>
                <EventTrigger RoutedEvent="Binding.TargetUpdated">
                    <BeginUIStoryboard>
                        <UIStoryboard DurationOverride="{StaticResource H_TimeSpan_NextOnDuration}"
                                      FillBehavior="Stop">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)">
                                <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                                        Value="0" />
                                <DiscreteDoubleKeyFrame KeyTime="0:0:0.5"
                                                        Value="0" />
                                <EasingDoubleKeyFrame KeyTime="0:0:1"
                                                      Value="1"
                                                      EasingFunction="{QuadraticEasing EasingMode=EaseOut}" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)">
                                <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                                        Value="{StaticResource H_Slide_Offset}" />
                                <EasingDoubleKeyFrame KeyTime="0:0:1"
                                                      Value="0"
                                                      EasingFunction="{QuadraticEasing EasingMode=EaseOut}" />
                            </DoubleAnimationUsingKeyFrames>
                        </UIStoryboard>
                    </BeginUIStoryboard>
                </EventTrigger>
            </Style.Triggers>
        </Style>
        <Style x:Key="H_Style_AnimateOn_AfterFirst">
            <Style.Triggers>
                <EventTrigger RoutedEvent="Binding.TargetUpdated">
                    <BeginUIStoryboard>
                        <UIStoryboard FillBehavior="HoldEnd">
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Style">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                                        Value="{StaticResource H_Style_AnimateOn}" />
                            </ObjectAnimationUsingKeyFrames>
                        </UIStoryboard>
                    </BeginUIStoryboard>
                </EventTrigger>
            </Style.Triggers>
        </Style>
        <Style x:Key="H_Style_AnimateOff_AfterFirst">
            <Style.Triggers>
                <EventTrigger RoutedEvent="Binding.TargetUpdated">
                    <BeginUIStoryboard>
                        <UIStoryboard FillBehavior="HoldEnd">
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Style">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                                        Value="{StaticResource H_Style_AnimateOff}" />
                            </ObjectAnimationUsingKeyFrames>
                        </UIStoryboard>
                    </BeginUIStoryboard>
                </EventTrigger>
            </Style.Triggers>
        </Style>
        <Style x:Key="H_Style_Animate_DisableAButton">
            <Style.Triggers>
                <EventTrigger RoutedEvent="Binding.TargetUpdated">
                    <BeginUIStoryboard>
                        <UIStoryboard FillBehavior="Stop">
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Command">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                                        Value="{x:Null}" />
                                <DiscreteObjectKeyFrame KeyTime="0:0:0.4"
                                                        Value="{x:Null}" />
                            </ObjectAnimationUsingKeyFrames>
                        </UIStoryboard>
                    </BeginUIStoryboard>
                </EventTrigger>
            </Style.Triggers>
        </Style>
        <Style x:Key="H_Style_TitleText"
               TargetType="FZTextBlock">
            <Setter Property="HorizontalAlignment"
                    Value="Center" />
            <Setter Property="FontFamily"
                    Value="Horizon_C" />
            <Setter Property="CapHeight"
                    Value="27" />
            <Setter Property="Color"
                    Value="{StaticResource H_Color_Primary_White}" />
        </Style>
        <Style x:Key="H_Style_SubtitleText"
               TargetType="FZTextBlock">
            <Setter Property="HorizontalAlignment"
                    Value="Center" />
            <Setter Property="FontFamily"
                    Value="Horizon_D" />
            <Setter Property="MarkupConverter"
                    Value="{Binding CampaignId, Converter={StaticResource H_MarkupConverter_Subtitle}}" />
            <Setter Property="CapHeight"
                    Value="18" />
            <Setter Property="Color"
                    Value="{StaticResource H_Color_Primary_White}" />
        </Style>
        
        <Style x:Key="H_Style_FZTextBlock_Reward_Count" TargetType="FZTextBlock">
            <Style.Resources>
                <MappingConverter x:Key="H_Converter_CampaignId_to_RewardText_Color" Default="{StaticResource H_Color_Primary_Black}">
                    <MappingConverterEntry Key="{StaticResource H_Id_DiscoverCampaign}" Value="{StaticResource H_Color_Primary_Yellow}"/>
                    <MappingConverterEntry Key="{StaticResource H_Id_FestivalCampaign}" Value="{StaticResource H_Color_Primary_Yellow}"/>
                </MappingConverter>
            </Style.Resources>
            <Setter Property="CapHeight" Value="21"/>
            <Setter Property="Color" Value="{Binding CampaignId, Converter={StaticResource H_Converter_CampaignId_to_RewardText_Color}}"/>
        </Style>

        <Style x:Key="H_Style_FZTextBlock_Reward_Count_Title" TargetType="FZTextBlock">
            <Style.Resources>
                <MappingConverter x:Key="H_Converter_CampaignId_to_RewardText_Color" Default="{StaticResource H_Color_Primary_Black}">
                    <MappingConverterEntry Key="{StaticResource H_Id_DiscoverCampaign}" Value="{StaticResource H_Color_Primary_White}"/>
                    <MappingConverterEntry Key="{StaticResource H_Id_FestivalCampaign}" Value="{StaticResource H_Color_Primary_White}"/>
                </MappingConverter>
            </Style.Resources>
            <Setter Property="CapHeight" Value="21"/>
            <Setter Property="Color" Value="{Binding CampaignId, Converter={StaticResource H_Converter_CampaignId_to_RewardText_Color}}"/>
        </Style>
    </Page.Resources>
    <UIPageTransitionManager.TransitionManager>
        <UIPageTransitionManager Preset="{StaticResource A_UIPageTransitionManagerPreset_Popup}" />
    </UIPageTransitionManager.TransitionManager>
    <Grid>
        <!--PageInputHandler x:Name="lb_button"
                          Button="LBumper"
                          Command="{Binding ScrollPagePrevCommand, ElementName=tab_bar}" />
        <PageInputHandler x:Name="rb_button"
                          Button="RBumper"
                          Command="{Binding ScrollPageNextCommand, ElementName=tab_bar}" /-->
        <FZMaterialGlassCapture />
        <FZMaterial Style="{StaticResource A_Style_FZMaterial_Popup_Background}" />
        <FZMaterial Color="#000"
                    Opacity="0.4" />
        <FZMaterialGlassCapture />
        <PageInputHandler x:Name="a_button"
                          Button="A"
                          Style="{StaticResource H_Style_Animate_DisableAButton}"
                          Tag="{Binding Reward, NotifyOnTargetUpdated=True}"
                          Command="{Binding NextCommand}" />
        <PageInputHandler x:Name="b_button"
                          Button="B"
                          Command="{Binding BackCommand}" />
        <ContentControl x:Name="BottomBar"
                        Panel.ZIndex="10"
                        Style="{StaticResource A_Style_ButtonBar}">
            <ControllerButtonPanel x:Name="PART_HelpPanel"
                                   Style="{StaticResource A_Style_ControllerButtonPanel_Default}">
                <ControllerButtonControl Button="{Binding Button, ElementName=a_button}"
                                         Description="{Loc HelpButtons.IDS_Next}" />
                <ControllerButtonControl Button="{Binding Button, ElementName=b_button}"
                                         Description="{Loc HelpButtons.IDS_Back}"
                                         Visibility="{Binding Command.Enabled, FallbackValue=Collapsed, Converter={FZBooleanToVisibilityConverter}, ElementName=b_button}" />
            </ControllerButtonPanel>
        </ContentControl>
        <Border Style="{StaticResource A_Style_Border_ScenePadding_Opus}"
                SnapsToDevicePixels="True"
                UseLayoutRounding="True"
                x:Name="root">
            <Grid HorizontalAlignment="Center"
                  VerticalAlignment="Center"
                  Width="668"
                  Height="598"
                  Style="{StaticResource A_Style_FrameworkElement_DefaultTransition}"
                  UIPageTransitionManager.TransitionIndex="0">
                <FZMaterial x:Name="background"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Top"
                            Margin="0,-17,0,0"
                            GetSizeFromTexture="True"
                            ImageSource="{Binding CampaignId, Converter={StaticResource H_Converter_CampaignToBackground}}" />
                <DockPanel Margin="50,0">
                    <Grid DockPanel.Dock="Top">
                        <Grid Width="138"
                              Margin="0,-80,0,0">
                            <FZMaterial Style="{StaticResource H_Style_AnimateOff}"
                                        LastBinding.Input="{Binding IconPath, NotifyOnTargetUpdated=True}"
                                        ImageSource="{Binding (LastBinding.Output), RelativeSource={RelativeSource Self}}"
                                        Stretch="UniformToFill"
                                        VerticalAlignment="Top" />
                            <FZMaterial Style="{StaticResource H_Style_AnimateOn_AfterFirst}"
                                        ImageSource="{Binding IconPath, NotifyOnTargetUpdated=True}"
                                        Stretch="UniformToFill"
                                        x:Name="current_icon"
                                        VerticalAlignment="Top" />
                        </Grid>
                        <DockPanel LastChildFill="False"
                                   Margin="0,44,0,0">
                            <Grid DockPanel.Dock="Top">
                                <Decorator Style="{StaticResource H_Style_AnimateOn}">
                                    <FZTextBlock Text="{Binding Title, NotifyOnTargetUpdated=True}"
                                                 Style="{StaticResource H_Style_TitleText}"
                                                 local:ScreenReader.Line="{Binding Text, RelativeSource={RelativeSource Self}, Converter={StaticResource A_Converter_TrimInlineMarkup}}"
                                                 local:ScreenReader.LineType="ScreenTitle"
                                                 local:ScreenReader.Event="OnChange" />
                                </Decorator>
                                <Decorator Style="{StaticResource H_Style_AnimateOff}">
                                    <FZTextBlock LastBinding.Input="{Binding Title, NotifyOnTargetUpdated=True}"
                                                 Text="{Binding (LastBinding.Output), RelativeSource={RelativeSource Self}}"
                                                 Style="{StaticResource H_Style_TitleText}" />
                                </Decorator>
                            </Grid>
                            <Decorator Height="14"
                                       DockPanel.Dock="Top" />
                            <Grid DockPanel.Dock="Top">
                                <Decorator Style="{StaticResource H_Style_AnimateOn}">
                                    <FZTextBlock Text="{Binding Subtitle, NotifyOnTargetUpdated=True}"
                                                 Style="{StaticResource H_Style_SubtitleText}"
                                                 RenderTransform="{TranslateTransform X=0}"
                                                 local:ScreenReader.Line="{Binding Text, RelativeSource={RelativeSource Self}, Converter={StaticResource A_Converter_TrimInlineMarkup}}"
                                                 local:ScreenReader.LineType="ScreenSubtitle"
                                                 local:ScreenReader.Event="OnChange" />
                                </Decorator>
                                <Decorator Style="{StaticResource H_Style_AnimateOff}">
                                    <FZTextBlock LastBinding.Input="{Binding Subtitle, NotifyOnTargetUpdated=True}"
                                                 Text="{Binding (LastBinding.Output), RelativeSource={RelativeSource Self}}"
                                                 Style="{StaticResource H_Style_SubtitleText}" />
                                </Decorator>
                            </Grid>
                        </DockPanel>
                    </Grid>
                    <Grid DockPanel.Dock="Bottom"
                          Height="60">
                        <StackPanel Orientation="Horizontal"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    TextElement.FontFamily="Horizon_C_tf"
                                    local:MultiStringFormatter.Format="{local:Loc Campaign.IDS_ScreenReader_Format_BatchRewardNum}"
                                    local:MultiStringFormatter.Param0="{Binding Progress}"
                                    local:MultiStringFormatter.Param1="{Binding Total}"
                                    local:ScreenReader.Line="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}, Converter={StaticResource A_Converter_TrimInlineMarkup}}"
                                    local:ScreenReader.LineType="ItemState"
                                    local:ScreenReader.Event="OnChange">
                            <FZTextBlock Style="{StaticResource H_Style_FZTextBlock_Reward_Count_Title}"
                                         Text="{Loc Campaign.IDS_Reward}" />
                            <Decorator Width="10" />
                            <Grid Width="{Binding ActualWidth, ElementName=total}">
                                <FZTextBlock TextAlignment="Right"
                                             Text="{Binding Progress}" 
                                             Style="{StaticResource H_Style_FZTextBlock_Reward_Count}"/>
                            </Grid>
                            <FZTextBlock Grid.Column="1"
                                         Text="/" 
                                         Style="{StaticResource H_Style_FZTextBlock_Reward_Count}"/>
                            <FZTextBlock x:Name="total"
                                         Grid.Column="3"
                                         Text="{Binding Total}" 
                                         Style="{StaticResource H_Style_FZTextBlock_Reward_Count}"/>
                        </StackPanel>
                    </Grid>
                    <Decorator DockPanel.Dock="Bottom" Height="4"/>
                    <Grid x:Name="reward" Margin="0,14,0,0">
                        <Control Template="{StaticResource H_Template_XAMLReward}"
                                 LastBinding.Input="{Binding Reward}"
                                 Tag="{Binding (LastBinding.Output), NotifyOnTargetUpdated=True, RelativeSource={RelativeSource Self}}"
                                 Style="{StaticResource H_Style_AnimateOff_AfterFirst}" />
                        <Control Template="{StaticResource H_Template_XAMLReward}"
                                 Tag="{Binding Reward, NotifyOnTargetUpdated=True}"
                                 Style="{StaticResource H_Style_AnimateOn}" />
                    </Grid>
                </DockPanel>
                <FZMaterial HorizontalAlignment="Left"
                            VerticalAlignment="Bottom"
                            Margin="-65,0,0,-38"
                            ImageSource="{Binding CampaignId, Converter={StaticResource H_Converter_CampaignToGiftIcon}}"
                            GetSizeFromTexture="True" />
            </Grid>
        </Border>
    </Grid>
</Page>
