AutoCatAvalonia/AutoCat/Views/PlateView.axaml

57 lines
3.0 KiB
XML

<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ext="clr-namespace:AutoCat.Extensions"
xmlns:views="clr-namespace:AutoCat.Views"
mc:Ignorable="d" d:DesignWidth="520" d:DesignHeight="112"
x:Class="AutoCat.Views.PlateView"
x:Name="PlateViewControl"
SizeChanged="UserControl_SizeChanged">
<Grid Height="{ext:Math Path=#PlateViewControl.Bounds.Width, Mult={x:Static views:PlateView.AspectRatio}}">
<Rectangle RadiusX="6" RadiusY="6" Fill="#ccc"/>
<Grid ColumnDefinitions="73*,27*">
<Grid>
<Rectangle Grid.Column="0" RadiusX="4" RadiusY="4" VerticalAlignment="Stretch" Fill="#333" Margin="2"/>
<TextBlock x:Name="NumberBox"
Text="A163AA"
VerticalAlignment="Center"
HorizontalAlignment="Center"
TextAlignment="Center"
Foreground="#ccc"
FontSize="{ext:Math Path=#PlateViewControl.Bounds.Height, Mult=0.6}"/>
</Grid>
<Rectangle Grid.Column="1" RadiusX="4" RadiusY="4" VerticalAlignment="Stretch" Fill="#333" Margin="0,2,2,2"/>
<Grid Grid.Column="1" Margin="0,2,2,2" RowDefinitions="65*,35*">
<TextBlock Grid.Row="0"
x:Name="RegionBox"
Text="161"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Foreground="#ccc"
FontSize="{ext:Math Path=#PlateViewControl.Bounds.Height, Mult=0.35}"/>
<Grid Grid.Row="1" Margin="3,1" x:Name="CountryRow" ColumnDefinitions="Auto,*">
<TextBlock Grid.Column="0"
x:Name="CountryName"
Text="RUS"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Foreground="#ccc"
FontSize="{ext:Math Path=#PlateViewControl.Bounds.Height, Mult=0.2}"/>
<!--
<Grid Grid.Column="2" x:Name="FlagGrid" Margin="1" RowDefinitions="*,*,*">
<Rectangle Grid.Row="0" Fill="White"/>
<Rectangle Grid.Row="1" Fill="Blue"/>
<Rectangle Grid.Row="2" Fill="Red"/>
</Grid>
-->
</Grid>
</Grid>
</Grid>
</Grid>
</UserControl>