<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:ec="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions"
             xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
             xmlns:ReflectionIT_Phone_Behaviors="clr-namespace:ReflectionIT.Phone.Behaviors"
             x:Class="Flashcard.Views.AnswerButton"
             Width="227"
             Height="227">

    <i:Interaction.Behaviors>
        <ReflectionIT_Phone_Behaviors:EnumDataStateBehavior Binding="{Binding Status}" />
    </i:Interaction.Behaviors>

    <Grid x:Name="LayoutRoot"
          Background="Transparent">
        <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="StatusStates">
                <VisualStateGroup.Transitions>
                    <VisualTransition GeneratedDuration="0:0:0.2" />
                </VisualStateGroup.Transitions>
                <VisualState x:Name="Normal" />
                <VisualState x:Name="Correct">
                    <Storyboard>
                        <ColorAnimation Duration="0"
                                        To="#FF00AB0A"
                                        Storyboard.TargetProperty="(Control.Background).(SolidColorBrush.Color)"
                                        Storyboard.TargetName="button" />
                    </Storyboard>
                </VisualState>
                <VisualState x:Name="Incorrect">
                    <Storyboard>
                        <ColorAnimation Duration="0"
                                        To="Red"
                                        Storyboard.TargetProperty="(Control.Background).(SolidColorBrush.Color)"
                                        Storyboard.TargetName="button" />
                    </Storyboard>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>

        <Button x:Name="button"
                FontSize="{StaticResource FontSize}"
                Content="{Binding Text}"
                Command="{Binding AnswerCommand, Source={StaticResource MainViewModelDataSource}}"
                CommandParameter="{Binding}"
                Background="#FD000000">

        </Button>
    </Grid>
</UserControl>