Enabling the Device
Once you get an instance of ClaimedBarcodeScanner
, you should attach handlers to its relevant events. The main event is DataReceived
, but you can also handle TriggerPressed
, TriggerReleased
, ErrorOccurred
, and ImagePreviewReceived
(in addition to ReleaseDeviceRequested
).
Once you do this, you can enable it by setting its IsEnabled
property to true
. If you want to automatically disable it after you receive data, you can set IsDisabledOnDataReceived
to true
. Otherwise, you can just manage the value of IsEnabled
yourself.
Get Universal Windows® Apps with XAML and C# Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.