<?xml version="1.0" encoding="utf-8" ?>
<Page x:ConnectionId='1' x:Class="Lab.Mvvm.BooksPage"
      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:local="using:Lab.Mvvm"
      xmlns:model="using:Lab.Mvvm.Models"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
      mc:Ignorable="d">

    <Grid x:ConnectionId='2' x:Name="ContentArea"
          Padding="10"
          RowSpacing="10">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <TextBlock Grid.Row="0"
                   Style="{StaticResource TitleLargeTextBlockStyle}"
                   Text="Books" />

        <StackPanel Grid.Row="1" Orientation="Horizontal">
            <ComboBox x:ConnectionId='9' x:Name="genreFilterComboBox"
                      Grid.Row="1"
                      PlaceholderText="Filter Genre" 
                                                             
                                                                                   />
            <Button x:ConnectionId='10' x:Name="clearGenreFilterButton"
                    Content="Clear" />
        </StackPanel>

        <ItemsView x:ConnectionId='3' x:Name="booksGridView" Grid.Row="2"                                                     >
            <ItemsView.Layout>
                <LinedFlowLayout ItemsStretch="Fill"
                                 LineHeight="160"
                                 LineSpacing="5"
                                 MinItemSpacing="5" />
            </ItemsView.Layout>
            <ItemsView.ItemTemplate>
                <DataTemplate                        >
                    <ItemContainer x:ConnectionId='5'>
                        <Grid>
                            <Image x:ConnectionId='6' MinWidth="70"
                                   HorizontalAlignment="Center"
                                   VerticalAlignment="Center"
                                                             
                                   Stretch="UniformToFill" />
                            <StackPanel Height="40"
                                        Padding="5,1,5,1"
                                        VerticalAlignment="Bottom"
                                        Background="{ThemeResource SystemControlBackgroundBaseMediumBrush}"
                                        Opacity=".75"
                                        Orientation="Vertical">
                                <TextBlock x:ConnectionId='7' Foreground="{ThemeResource SystemControlForegroundAltHighBrush}"                       />
                                <TextBlock x:ConnectionId='8' Foreground="{ThemeResource SystemControlForegroundAltHighBrush}"
                                           Style="{ThemeResource CaptionTextBlockStyle}"
                                                                 />
                            </StackPanel>
                        </Grid>
                    </ItemContainer>
                </DataTemplate>
            </ItemsView.ItemTemplate>
        </ItemsView>
    </Grid>
</Page>

