﻿<UserControl
    x:Class="WinStore.UX.Controls.RateAndReview.StarRatingFeedbackControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:controls="using:WinStore.UX.Controls"
    mc:Ignorable="d"
    d:DesignHeight="300"
    d:DesignWidth="400">

  <StackPanel>
    <VisualStateManager.VisualStateGroups>
      <VisualStateGroup x:ConnectionId='1' x:Name="HardwareWarningBlockStates">
        <VisualState x:ConnectionId='2' x:Name="RateHardwareWarningBlockOff" />
        <VisualState x:ConnectionId='3' x:Name="RateHardwareWarningBlockOn">
          <Storyboard>
            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="_starRatingControl" Storyboard.TargetProperty="(UIElement.IsEnabled)">
              <DiscreteObjectKeyFrame KeyTime="0" Value="False" />
            </ObjectAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="_ratingHardwareWarningBlockCaption" Storyboard.TargetProperty="(UIElement.Visibility)">
              <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
            </ObjectAnimationUsingKeyFrames>
          </Storyboard>
        </VisualState>
      </VisualStateGroup>
    </VisualStateManager.VisualStateGroups>

    <TextBlock x:ConnectionId='4'
      x:Name="_ratingHardwareWarningBlockCaption"
      x:Uid="RatingsAndReviewsSoftBlockRateApp"
      AutomationProperties.AutomationId="RatingHardwareWarningBlockCaption"
      Style="{StaticResource CaptionTextBlockStyle}"
      Foreground="{ThemeResource SecondaryForegroundBrush}"
      TextWrapping="Wrap"
      Margin="0,5,0,6"
      Visibility="Collapsed" />
    <StackPanel Orientation="Horizontal">
      <controls:StarRatingControl x:ConnectionId='5' x:Name="_starRatingControl"
                                         
                                       />
      <TextBlock x:ConnectionId='6' x:Name="_starRatingCaption"
        Margin="15,23,0,0"
        VerticalAlignment="Top"
        AutomationProperties.LiveSetting="Assertive"
        Foreground="{ThemeResource SecondaryForegroundBrush}"
        Style="{StaticResource CaptionTextBlockStyle}" />
    </StackPanel>
  </StackPanel>
</UserControl>

