Store App QRCode Encoding not working?

Sep 26, 2014 at 12:01 PM

I have referenced the ZXing.winmd library and I think (even while its not working) that I've implemented the code for creating a qr code right:

  <Image Name="qrImage" Width="200" Height="200" />
on ButtonClick:
BarcodeWriter b = new BarcodeWriter();
            b.Format = BarcodeFormat.QR_CODE;
            b.Options = new ZXing.Common.EncodingOptions
                Height = 200,//(int)imageBarcodeEncoder.Height,
                Width = 200,//(int)imageBarcodeEncoder.Width,
                Margin = 0
            b.Renderer = new ZXing.Rendering.PixelDataRenderer();

            var image = b.Write("Test");

            var resultImage = await Utilities.ByteArrayToWriteableBitmap(image.Pixel);

            qrImage.Source = resultImage;
public static async Task<WriteableBitmap> ByteArrayToWriteableBitmap(byte[] byteArray)
            var writeImage = new WriteableBitmap(200, 200);

            var stream = new InMemoryRandomAccessStream();
            await stream.WriteAsync(byteArray.AsBuffer());


            return writeImage;
The source gets changed correctly, but there is no qr code visible. What am I doing wrong?
Sep 26, 2014 at 12:32 PM
Edited Sep 26, 2014 at 12:32 PM
solved the problem finally myself. didn't saw the ToBitmap() method ;)
qrImage.Source = image.ToBitmap() as ImageSource;