Itp.WpfScanners
2.0.5
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Itp.WpfScanners --version 2.0.5
NuGet\Install-Package Itp.WpfScanners -Version 2.0.5
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="2.0.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Itp.WpfScanners --version 2.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Itp.WpfScanners, 2.0.5"
#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.
// Install Itp.WpfScanners as a Cake Addin #addin nuget:?package=Itp.WpfScanners&version=2.0.5 // Install Itp.WpfScanners as a Cake Tool #tool nuget:?package=Itp.WpfScanners&version=2.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
ITP WPF Barcode Scanner API
Keyboard-like incorporation of barcode scanners into WPF applications. Support for Serial and HID barcode scanners.
ScannerScope
s 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 ScannerScope
s, 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 | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0-windows10.0.22621 is compatible. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net7.0-windows10.0.22621
- Esatto.Win32.Common (>= 1.0.1)
- Esatto.Win32.Registry (>= 1.0.1)
- Itp.HidBarcodeScanner (>= 2.0.5)
- System.IO.Ports (>= 7.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.