<Page x:Class="AdaptiveLayout.MainPage"
      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:AdaptiveLayout"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      xmlns:vm="using:AdaptiveLayout.ViewModel"
      mc:Ignorable="d">
    <Page.Resources>
        <DataTemplate x:Key="DataTemplate.Book">
            <local:AdaptiveItemTemplateControl />
        </DataTemplate>
    </Page.Resources>
    <Page.DataContext>
        <vm:MainViewModel />
    </Page.DataContext>
    <ListBox ItemTemplate="{StaticResource DataTemplate.Book}"
             ItemsSource="{Binding Path=Books, Mode=OneWay}"
             SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}" />
</Page>
