<Page
    x:Class="YJMPD_UWP.Views.MatchView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:YJMPD_UWP.Views"
    xmlns:convert="using:YJMPD_UWP.Helpers.Converter"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Page.Resources>
        <convert:BoolToVisibilityConverter x:Key="BoolToVisConverter" />
    </Page.Resources>

    <Grid Style="{StaticResource BaseGrid}">
        <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" ZoomMode="Enabled">
            <Image Name="Photo" Stretch="UniformToFill" Source="{Binding Photo}"/>
        </ScrollViewer>

        <StackPanel Visibility="{Binding MessageVisible, Converter={StaticResource BoolToVisConverter}}" Background="DarkGreen" Padding="20" VerticalAlignment="Bottom">
            <TextBlock Foreground="White" Text="{Binding Message}" />
        </StackPanel>

        <StackPanel Visibility="{Binding ErrorVisible, Converter={StaticResource BoolToVisConverter}}" Background="DarkRed" Padding="20" VerticalAlignment="Bottom">
            <TextBlock Foreground="White" Text="{Binding Error}" />
        </StackPanel>
    </Grid>
</Page>
