AutoCatUwp/AutoCat/Pages/SearchPage.xaml

46 lines
1.9 KiB
XML

<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"
xmlns:custom="using:AutoCat.Controls"
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" Margin="0,8" Spacing="4">
<TextBlock Text="{x:Bind Brand.Name.Original}"/>
<custom:PlateView Number="{x:Bind Number}" Height="40"/>
</StackPanel>
</DataTemplate>
</Page.Resources>
<controls:MasterDetailsView Name="MasterDetail" Loaded="MasterDetail_Loaded" ItemsSource="{x:Bind viewModel.Vehicles}"
ItemTemplate="{StaticResource VehicleTemplate}" DetailsTemplate="{StaticResource VehicleDetailTemplate}">
<controls:MasterDetailsView.MasterHeader>
<Grid>
<AutoSuggestBox PlaceholderText="Search plate numbers" Margin="6"/>
</Grid>
</controls:MasterDetailsView.MasterHeader>
<controls:MasterDetailsView.MasterCommandBar>
<CommandBar>
<AppBarButton Label="Filters" Icon="Filter"/>
<AppBarButton Label="Map" Icon="Map"/>
</CommandBar>
</controls:MasterDetailsView.MasterCommandBar>
<controls:MasterDetailsView.DetailsCommandBar>
<CommandBar>
<AppBarButton Label="asdf" Icon="Add"/>
</CommandBar>
</controls:MasterDetailsView.DetailsCommandBar>
</controls:MasterDetailsView>
</Page>