Поделиться через


Scanning (XAML)

[This article is for Windows 8.x and Windows Phone 8.x developers writing Windows Runtime apps. If you’re developing for Windows 10, see the latest documentation]

Learn here how to scan content from your Windows Store app using C# or C++, by using a flatbed, feeder, or auto-configured scan source.

We assume that you already know how to write programs with C# or C++, and XAML, and that you have a scanner device installed on your computer.

Overview

To add the ability to scan from your Windows Store app in Windows 8.1, use the Windows.Devices.Scanners namespace. This namespace is built on top of the existing WIA APIs and is integrated with the Device Access API.

Windows Store app scanning

To scan from your Windows Store app, you must first list the available scanners by declaring a new DeviceInformation object and getting the DeviceClass type. Only scanners that are installed locally with WIA drivers are listed and available to your Windows Store app.

After your app has listed available scanners, it can use the auto-configured scan settings based on the scanner type, or just scan using the available flatbed or feeder scan source. To use auto-configured settings, the scanner must be enabled for auto-configuration must not be equipped with both a flatbed and a feeder scanner. For more info, see Auto-Configured Scanning.