Created
August 22, 2018 12:08
-
-
Save jfversluis/8e9acedafc3ef3fd6e279d9ccf08ff53 to your computer and use it in GitHub Desktop.
Custom layout for scanning barcodes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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.PartialScreenScanning" | |
xmlns:zxing="clr-namespace:ZXing.Net.Mobile.Forms;assembly=ZXing.Net.Mobile.Forms" | |
Title="Partial screen"> | |
<Grid> | |
<Grid.RowDefinitions> | |
<RowDefinition Height="*" /> | |
<RowDefinition Height="Auto" /> | |
<RowDefinition Height="*" /> | |
</Grid.RowDefinitions> | |
<BoxView Grid.Row="0" BackgroundColor="Chocolate"/> | |
<zxing:ZXingScannerView Grid.Row="1" x:Name="_scanView" OnScanResult="Handle_OnScanResult" IsScanning="true" | |
WidthRequest="200" HeightRequest="200" /> | |
<BoxView Grid.Row="2" BackgroundColor="Blue" /> | |
</Grid> | |
</ContentPage> |
The red line is part of the ScanningPage, think of it as an example view that is provided for you. The ScanningView allows you to customize that. It will provide you nothing out of the box, you can draw lines or whatever you want yourself though
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@jfversluis I see the camera view in the page but no red line (basically it's just a camera and it's not scanning) even if i set
IsScanning="True"
.Any idea why?