<Page
    x:Class="AutoCat.Pages.SearchPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:AutoCat.Pages"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls"
    xmlns:model="using:AutoCatCore.Model"
    mc:Ignorable="d"
    d:Width="600"
    d:Height="400"
    Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

    <Page.Resources>
        <DataTemplate x:Key="VehicleTemplate" x:DataType="model:Vehicle">
            <StackPanel Orientation="Vertical">
                <TextBlock Text="{x:Bind Brand.Name.Original}"/>
            </StackPanel>
        </DataTemplate>
    </Page.Resources>

    <controls:MasterDetailsView Name="MasterDetail" Loaded="MasterDetail_Loaded" ItemsSource="{x:Bind viewModel.Vehicles}" ItemTemplate="{StaticResource VehicleTemplate}" />
</Page>
