Search code examples
c#windows-phone-8barcodezxingqr-code

Reading QR Code & BarCode in windows phone 8


I am working on windows phone 8 App development..My requirement is to scan a QR code & Barcode and get the value embedded to it..

I have tried a lot with Zxing library.. please provide me with susitable solution


Solution

  • finally ..I have implemented this method..

    Include following namespace on your sample

    xmlns:jwqr="clr-namespace:JeffWilcox.Controls;assembly=JeffWilcox.Controls.QR"
    

    in XAml file.. include the following control

    <jwqr:QRCodeScanner
    ScanComplete="QRCodeScanner_ScanComplete"
    Error="QRCodeScanner_Error"
    Width="400"
    Height="400"/>
    

    In code behing..include the event handlers.

    private void QRCodeScanner_ScanComplete(object sender, JeffWilcox.Controls.ScanCompleteEventArgs e)
    {
    ApplicationTitle.Text = e.Result;
    }
    
    private void QRCodeScanner_Error(object sender, JeffWilcox.Controls.ScanFailureEventArgs e)
    {
    throw e.Exception;
    }
    

    for complete reference.. click here