17 November 2023
A vehicle license plate -as it's defined in Wikipedia- is a metal or plastic plate attached to a motor vehicle or trailer for official identification purposes. If you want to build a WPF program that shows license plates, you can use this project to demonstrate high quality license plates which are similar to the real plates.
There are some main parts in the project:- Flags
- Fonts
- Vectors
- Pic
- Plates
The project is not limited to a specific country, and there are country categories in each part. For example I have created my country plates, Iran, in this project. If you want to create your country plates you should add your country folder in each part.
It's very easy to use plates in your WPF project. Just add the corresponding plate to your XAML file:<Viewbox Width="240" xmlns:irplate="clr-namespace:IRPlateModel.Wpf.Plates.Iran;assembly=IRPlateModel.Wpf">
<irplate:IRNationalPlate Plate="{Binding MyPlate, Mode=OneWay}" />
</Viewbox>
Note: The only way to change the size of the plate is to use a Viewbox. The most important property of each plate control is the Plate property. In the last example I bound it to MyPlate property. If you want to set it manually you should write plate's characters respectively and without any spaces, commas, etc. For example:
Plate inputs are simple textboxes decorated with some features of the corresponding plate. See this example:<irplate:IRNationalPlate Plate="12X34567" />
<StackPanel xmlns:irplate="clr-namespace:IRPlateModel.Wpf.Plates.Iran;assembly=IRPlateModel.Wpf"
xmlns:irplateInput="clr-namespace:IRPlateModel.Wpf.Plates.Iran.Input;assembly=IRPlateModel.Wpf">
<irplate:IRNationalPlate Plate="{Binding Plate, ElementName=myPlateInput, Mode=OneWay}" />
<irplateInput:IRNationalPlateInput x:Name="myPlateInput" />
</StackPanel>
What you type in the input control is shown in the plate control immediately.