Skip to content

Instantly share code, notes, and snippets.

@jfversluis
Created August 22, 2018 12:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jfversluis/fb0d8209a4a028379c289a4fa62ae368 to your computer and use it in GitHub Desktop.
Save jfversluis/fb0d8209a4a028379c289a4fa62ae368 to your computer and use it in GitHub Desktop.
Generating barcodes with ZXing
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="ZXingSample.GenerateBarcodePage"
xmlns:zxing="clr-namespace:ZXing.Net.Mobile.Forms;assembly=ZXing.Net.Mobile.Forms"
xmlns:zxcm="clr-namespace:ZXing.Common;assembly=zxing.portable"
Title="Generate">
<ScrollView>
<StackLayout HorizontalOptions="Center" VerticalOptions="Center">
<zxing:ZXingBarcodeImageView WidthRequest="300" HeightRequest="100" BarcodeValue="1337" BarcodeFormat="CODE_39" />
<zxing:ZXingBarcodeImageView WidthRequest="300" HeightRequest="300" BarcodeValue="1337" BarcodeFormat="QR_CODE" />
<zxing:ZXingBarcodeImageView WidthRequest="300" HeightRequest="100" BarcodeValue="1337133713378" BarcodeFormat="EAN_13" />
</StackLayout>
</ScrollView>
</ContentPage>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment