Share via


OcrControl.ResetAsync() Method

 

Deprecated. The ResetAsync() Method closes the camera if it is running and resets The Bing Optical Character Recognition (OCR) Control to its starting state. If the control is waiting on a service response when this method is called, the returned response is ignored.

Published date: March 4, 2014

Warning

The Bing OCR Control is deprecated as of March 12, 2014

Syntax

public IAsyncAction ResetAsync()
<Button onClick="MyOcrControl.ResetAsync();" .../>

Remarks

The reset functionality is an essential tool for the user to break out of errors and networking delays, and to quickly retake captures without having to wait for OCR processing.

If you call the ResetAsync() method directly, such as by invoking it in a button click handler, it will turn off the camera. To leave the camera running in preview mode, use the OcrControl.StartPreviewAsync() Method which calls ResetAsync() before restarting the camera.

Example

The following example creates a Cancel button that executes the ResetAsync() method when clicked.

<Button x:Name="btnCancel" Content="Cancel" Click="btnCancel_Click" .../>
private async void btnCancel_Click(object sender, RoutedEventArgs e)
{
    await OCR.ResetAsync();
}

Requirements

Minimum Supported Client

Windows 8.1

Required Extensions

Bing OCR

Namespace

Bing.Ocr