AutoCatAvalonia/AutoCat/Templates/VehicleCell.axaml

37 lines
1.6 KiB
XML

<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:models="using:AutoCatCore.Model"
xmlns:views="using:AutoCat.Views"
xmlns:ext="using:AutoCat.Extensions">
<ext:DateConverter x:Key="DateConverter"/>
<DataTemplate DataType="{x:Type models:Vehicle}" x:Key="VehicleCell">
<StackPanel Orientation="Vertical" Margin="0,4">
<Grid ColumnDefinitions="*">
<TextBlock Text="{Binding Brand.Name.Original}"/>
</Grid>
<Grid ColumnDefinitions="* Auto" RowDefinitions="*,*">
<views:PlateView Grid.RowSpan="2" Number="{Binding Number}"/>
<TextBlock
Grid.Column="1"
Grid.Row="0"
Margin="16,0,0,0"
FontSize="11"
Foreground="{DynamicResource SecondaryText}"
VerticalAlignment="Bottom"
Text="{Binding UpdatedDate, Converter={StaticResource DateConverter}}"/>
<TextBlock
Grid.Column="1"
Grid.Row="1"
Margin="16,0,0,0"
FontSize="11"
Foreground="{DynamicResource TertiaryText}"
VerticalAlignment="Bottom"
Text="{Binding AddedDate, Converter={StaticResource DateConverter}}"/>
</Grid>
</StackPanel>
</DataTemplate>
</ResourceDictionary>