﻿<UserControl
    x:Class="FeedbackApp.SIUFViews.SIUF_ThreePointQuestionView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:FeedbackApp.SIUFViews"
    xmlns:conv="using:FeedbackApp.Converters"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="300"
    d:DesignWidth="500">

    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="SIUFStyles.xaml"/>
            </ResourceDictionary.MergedDictionaries>

            <conv:EnumToBooleanConverter x:Key="EnumToBooleanConverter"/>

        </ResourceDictionary>
    </UserControl.Resources>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

        <!--Question Text-->
        <TextBlock Grid.Row="0" 
                   Text="{Binding Path=QuestionText}" 
                   Style="{ThemeResource QuestionText}"/>

        <!--Main Content-->
        <StackPanel Grid.Row="1">
            <RadioButton x:Name="RadioButtonPositive" IsChecked="{Binding Path=ResultThreePoint, Mode=TwoWay, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter=Microsoft.Windows.Internal.Feedback.ThreePoint.Positive}" Content="{Binding Path=AnchorTextPositive, Mode=OneWay}" Style="{ThemeResource RadioButton}"/>
            <RadioButton IsChecked="{Binding Path=ResultThreePoint, Mode=TwoWay, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter=Microsoft.Windows.Internal.Feedback.ThreePoint.Neutral}" Content="{Binding Path=AnchorTextNeutral, Mode=OneWay}" Style="{ThemeResource RadioButton}"/>
            <RadioButton IsChecked="{Binding Path=ResultThreePoint, Mode=TwoWay, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter=Microsoft.Windows.Internal.Feedback.ThreePoint.Negative}" Content="{Binding Path=AnchorTextNegative, Mode=OneWay}" Style="{ThemeResource RadioButton}"/>
        </StackPanel>

        <!--FollowUp Header-->
        <TextBlock Grid.Row="2" x:Name="FollowUpQuestion"
                   Text="{Binding Path=FollowUpQuestionText}" 
                   Style="{ThemeResource FollowUpQuestion}"/>

        <!--FollowUp Content-->
        <StackPanel Grid.Row="3">
            <TextBox x:Name="FollowUpTextBox" 
                     x:Uid="/FeedbackApp.Resources/SIUF_FollowupQuestion_TextBox" 
                     Text="{Binding Path=FollowUpText, Mode=TwoWay}" 
                     Style="{ThemeResource FollowUpQuestionTextBox}"
                     AutomationProperties.Name="{Binding Path=FollowUpQuestionText}"/>
        </StackPanel>

    </Grid>
</UserControl>

