How to scan barcode in WPF project using C# language?

back to home  >  Tech FAQ  >  Scan barcode in WPF project using C# .NET

Question:

Hi,support, I want to develop a WPF application, it can load barcode image, show this barcode image, and then decode this barcode picture out. So I wonder whether your .net barcode reader SDK can run in the WPF project?

---- Silvester

Answer:

Hi, Silvester.

The pqScan .net barcode reader component can be compatiblewith any .net project. So you can not only integrate our .net barcode reader library in WPF project, but also Winforms, asp.net web site applications.

If you want to add barcode scanning feature in the WPF program, it's really similar to the Windows forms application. They are both desktop projects, have the similar UI control layout and event. So you may insert the C# code of barcode reading feature to the button click event or MainWindowinitialization method.

Please look at the C# example code below. It's almost the same as the sample in any other Winforms projects. Before your starting, please download our trial version barcode reader SDK, and add it to the project reference.

Bitmap image = Bitmap.FromFile("barcode-image.jpg");

BarcodeResult[] results = BarCodeScanner.Scan(image);

Hope the C# code can be helpful.

---- pqScan Support Team

Online Demo Download Trial Can I Read Barcode in PDF document using C#? Need help for reading barcode with unconventional position? How to read barcode from Microsoft Office? Can I read barcode image from report in C# .NET? Can I read color barcode image in C# .NET? Is it available for reading all of the barcode in a picture by one time? How to scan barcode from webcam or other device? Can I use your barcode reading SDK in Mono? I can't scan barcode from my images with different DPI. How to scan barcode in asp.net web application? How to scan barcode in WPF project using C# language? Can I run your .net barcode reader library in Windows7 or Windows8? How to scan rotated barcode in .net project?