Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

WPFBarCode Nuget

Help in dealing with the barcode readers in your wpf application

How to use

In Your Control

var BarCodeReader = BarCoder.BarCodeReader.GetDefaultReader()
                            .WithPrefix(System.Windows.Input.Key.F12) // Configuration for the reader device for the prefix key
                            .WithSuffix(System.Windows.Input.Key.Enter)  // Configuration for the reader device for the suffix key
                            // To listen on specific input element
                            .WithUIElement(this, false, (result) =>
                            {
                                string code = result.Barcode;
                            })
                            // To notify the control using an event
                            .WithEvent(viewModel.DocumentId, viewModel.DocumentId.ToString(), new BarCoder.BaseBarCodeEvent((result) =>
                            {
                                string code = result.Barcode;
                                viewModel.OnBarcodeCallBack?.Invoke(code);
                            })).NotifyOnlyActiveEvent() // if you want to notify the ui using only the event you register
                            .SetCurrentActiveEvent(viewModel.DocumentId); // determin the current active window/page by setting a unique identifier for it this id will be with the event result

BarCodeReader.StartListen(); // start listen
....
BarCodeReader.StopListen(); // stop listen

About

Helps in dealing with barcode reader devices for WPF projects.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages