BarcodeScannerFrameReader.FrameArrived Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Event that is raised when a frame is ready to be acquired. This event will not be raised until the frame reader is started by using StartAsync.
// Register
event_token FrameArrived(TypedEventHandler<BarcodeScannerFrameReader, BarcodeScannerFrameReaderFrameArrivedEventArgs const&> const& handler) const;
// Revoke with event_token
void FrameArrived(event_token const* cookie) const;
// Revoke with event_revoker
BarcodeScannerFrameReader::FrameArrived_revoker FrameArrived(auto_revoke_t, TypedEventHandler<BarcodeScannerFrameReader, BarcodeScannerFrameReaderFrameArrivedEventArgs const&> const& handler) const;
public event TypedEventHandler<BarcodeScannerFrameReader,BarcodeScannerFrameReaderFrameArrivedEventArgs> FrameArrived;
function onFrameArrived(eventArgs) { /* Your code */ }
barcodeScannerFrameReader.addEventListener("framearrived", onFrameArrived);
barcodeScannerFrameReader.removeEventListener("framearrived", onFrameArrived);
- or -
barcodeScannerFrameReader.onframearrived = onFrameArrived;
Public Custom Event FrameArrived As TypedEventHandler(Of BarcodeScannerFrameReader, BarcodeScannerFrameReaderFrameArrivedEventArgs)
Event Type
Remarks
To acquire a frame after it arrives, call TryAcquireLatestFrameAsync. Note that calling TryAcquireLatestFrameAsync will always return the latest frame, not the frame that caused this event to be raised.
Use BarcodeScannerFrameReaderFrameArrivedEventArgs.GetDeferral if processing needs to be done asynchronously outside the scope of the method handler.