-1

I am new to wpf and the mvvm pattern, I have a problem, I am seeing the way to capture the value of the barcode scanner from the view model with mvvm without text box, I was investigating but I still have no answers.

I am doing it this way, here the link. ('Get data from barcode reader without textbox')

but i have the following problem. If there is any more efficient way I will be grateful for help. Thank you enter image description here

1
  • 1
    Please post your code as text, not an image. Commented Jun 4, 2020 at 20:05

1 Answer 1

0

Welcome to SO!

Without seeing your code it's impossible to answer this. Generally speaking though, most barcode readers are configurable to act as either keyboard, HID or virtual serial devices (check the manual, it will contain barcodes you can scan to switch between these modes).

If you configure it as a keyboard device, then add a TextInput handler to your main window.

If it's in HID mode then you'll need to use the HidDevice class.

If you configure it as a virtual serial device, then use the SerialPort class to capture the data.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.