Closed Olaf-R closed 5 months ago
The OnDetectionFinished command returns a result of type BarcodeResult[]
.
So in your view model, just add the parameter to your command like so:
[RelayCommand]
private void OnDetectionFinished(BarcodeResult[] results)
{
if (results.Length == 0)
return;
// your code...
}
Please note: in one of the newest versions, the type of the result changed from HashSet<BarcodeResult>
to BarcodeResult[]
. I don't know the exact version that changed it. So depending on your current version of the library, the type of the result may vary.
Cheers, works!
I suppose I really should've found the OnDetectionFinished EventHandler in which the array is defined ...
@afriscic: I'd recommend to add @fryndorfer's sample code to the docs!
Hello.
@fryndorfer thank you for an answer! @Olaf-R Sorry, unfortunately I'm quite busy this days so i was a bit slow to answer. I'll put @fryndorfer answer into readme in next release.
Hello again,
how do I retrieve a scanned code from within OnDetectionFinishedCommand? There isn't any bindable BarcodeResult property.
Am I missing something?
Cheers, Olaf