AutoCatAvalonia/AutoCat/Views/PlateView.axaml

64 lines
3.1 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 Name="MainRect" Fill="#ccc"/>
<Grid ColumnDefinitions="73*,27*">
<Grid>
<Rectangle Grid.Column="0"
Name="NumberRect"
VerticalAlignment="Stretch"
Fill="#333"/>
<TextBlock x:Name="NumberBox"
Text="A163AA"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Foreground="#ccc"
ClipToBounds="False"
FontFamily="{StaticResource RoadNumbersFont}"/>
</Grid>
<Rectangle Grid.Column="1"
Name="RegionRect"
VerticalAlignment="Stretch"
Fill="#333"/>
<Grid Grid.Column="1" Name="RegionGrid" RowDefinitions="65*,35*">
<TextBlock Grid.Row="0"
x:Name="RegionBox"
Text="161"
ClipToBounds="False"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Foreground="#ccc"
FontFamily="{StaticResource RoadNumbersFont}"/>
<StackPanel Grid.Row="1" x:Name="CountryRow"
Orientation="Horizontal"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<TextBlock Grid.Column="0"
x:Name="CountryName"
Text="RUS"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Foreground="#ccc"/>
<Grid Grid.Column="2" x:Name="FlagGrid" RowDefinitions="*,*,*">
<Rectangle Grid.Row="0" Fill="White"/>
<Rectangle Grid.Row="1" Fill="Blue"/>
<Rectangle Grid.Row="2" Fill="Red"/>
</Grid>
</StackPanel>
</Grid>
</Grid>
</Grid>
</UserControl>