Skip to content

Commit

Permalink
Merge pull request #102 from LanceMcCarthy/main
Browse files Browse the repository at this point in the history
[Demo App] Update Label upon successful scan
  • Loading branch information
Redth authored Oct 23, 2023
2 parents 85a0b9a + 1c1c75f commit d32ca7a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion BigIslandBarcode/MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<Grid
Grid.Row="0"
BackgroundColor="#aa000000">
<Label Grid.Row="2" Text="Top text..." HorizontalOptions="Center" VerticalOptions="Center" TextColor="White" />
<Label x:Name="ResultLabel" Grid.Row="2" Text="Top text..." HorizontalOptions="Center" VerticalOptions="Center" TextColor="White" />
</Grid>

<Grid
Expand Down
4 changes: 4 additions & 0 deletions BigIslandBarcode/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,13 @@ protected void BarcodesDetected(object sender, BarcodeDetectionEventArgs e)
{
Dispatcher.Dispatch(() =>
{
// Update BarcodeGeneratorView
barcodeGenerator.ClearValue(BarcodeGeneratorView.ValueProperty);
barcodeGenerator.Format = first.Format;
barcodeGenerator.Value = first.Value;
// Update Label
ResultLabel.Text = $"Barcodes: {first.Format} -> {first.Value}";
});
}
}
Expand Down

0 comments on commit d32ca7a

Please sign in to comment.