<Page
	x:Class="FirstUniversalApp.MainPage"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:local="using:FirstUniversalApp"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d"
	Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

	<Grid>
		<ListView x:Name="MainLongListSelector" Margin="0,0,-12,0" 
				ItemsSource="{Binding Items}"
				SelectionChanged="MainLongListSelector_SelectionChanged">
			<ListView.ItemTemplate>
				<DataTemplate>
					<Grid Margin="0,0,0,17">
						<Grid.RowDefinitions>
							<RowDefinition/>
							<RowDefinition/>
						</Grid.RowDefinitions>
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="80"/>
							<ColumnDefinition Width="*"/>
						</Grid.ColumnDefinitions>
						<Image Grid.RowSpan="2" Grid.Row="0" Grid.Column="0" Source="{Binding ImageUri}" Width="80" Height="80" Margin="0,0,10,0"/>
						<TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding Title}" TextWrapping="NoWrap" FontSize="18" />
						<TextBlock Grid.Row="1" Grid.Column="1"  Text="{Binding Author}" TextWrapping="NoWrap" FontSize="14" />
					</Grid>
				</DataTemplate>
			</ListView.ItemTemplate>
		</ListView>
	</Grid>
	<Page.BottomAppBar>
		<CommandBar>
			<CommandBar.PrimaryCommands>
				<AppBarButton x:Name="Refresh" Label="Refresh" Click="Refresh_Click" Icon="Refresh"/>
				<AppBarButton x:Name="Speak" Label="Speak" Click="Speak_Click" Icon="Microphone"/>
			</CommandBar.PrimaryCommands>
		</CommandBar>
	</Page.BottomAppBar>
</Page>
