Itp.WpfScanners 3.0.0

dotnet add package Itp.WpfScanners --version 3.0.0
                    
NuGet\Install-Package Itp.WpfScanners -Version 3.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Itp.WpfScanners" Version="3.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Itp.WpfScanners" Version="3.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Itp.WpfScanners" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Itp.WpfScanners --version 3.0.0
                    
#r "nuget: Itp.WpfScanners, 3.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Itp.WpfScanners@3.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Itp.WpfScanners&version=3.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Itp.WpfScanners&version=3.0.0
                    
Install as a Cake Tool

ITP WPF Barcode Scanner API

Keyboard-like incorporation of barcode scanners into WPF applications. Support for Serial and HID barcode scanners.

ScannerScopes are a container element which handles scans which occur when focus is within the scope.

Scanner scopes connect to a parent ScannerControlScope, which "owns" the scanner and interacts with hardware.

When focus is outside of any ScannerScopes, the scanner is disabled or ceded to other applications

Example use

<Window x:Class="Itp.WpfScanners.TestClient.ScannerTestWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:cscan="urn:itp:scanners"
        Title="ScannerTestWindow" Height="300" Width="300">
    <cscan:ScannerControlScope AutoConfigure="True">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="1*" />
                <ColumnDefinition Width="1*" />
            </Grid.ColumnDefinitions>

            <TextBox Text="This side of the form is not scanner enabled" />
            <GroupBox Header="This side is enabled" Grid.Column="1">
                <cscan:ScannerScope x:Name="scope1" ScanReceived="scope1_ScanReceived">
                    <StackPanel Orientation="Vertical">
                        <TextBox x:Name="tbS1" Text="This is attached to the outside" />
                            <GroupBox Header="still enabled">
                            <cscan:ScannerScope x:Name="scope2" ScanReceived="scope2_ScanReceived">
                                <StackPanel Orientation="Vertical">
                                    <Button Content="this is on the inside" x:Name="btS2" />
                                </StackPanel>
                            </cscan:ScannerScope>
                        </GroupBox>
                    </StackPanel>
                </cscan:ScannerScope>
            </GroupBox>
        </Grid>
    </cscan:ScannerControlScope>
</Window>

Codebehind:

using System.Windows;

namespace Itp.WpfScanners.TestClient
{
    public partial class ScannerTestWindow : Window
    {
        public ScannerTestWindow()
        {
            InitializeComponent();
        }

        private void scope1_ScanReceived(object? sender, ScannedDataEventArgs args)
        {
            tbS1.Text = args.TextData;
            args.IsHandled = true;
        }

        private void scope2_ScanReceived(object? sender, ScannedDataEventArgs args)
        {
            btS2.Content = args.TextData;
            args.IsHandled = true;
        }
    }
}

Known issues

Product Compatible and additional computed target framework versions.
.NET net8.0-windows10.0.22621 is compatible.  net9.0-windows was computed.  net10.0-windows was computed. 
.NET Framework net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.0 159 1/23/2025
3.0.0-preview14 146 3/28/2025
2.0.9 176 7/14/2024
2.0.8-preview1 136 3/28/2025
2.0.7 194 8/23/2023
2.0.6 186 5/16/2023
2.0.5 183 5/16/2023
2.0.4 211 4/30/2023
2.0.3 216 4/22/2023
2.0.2 220 4/22/2023