Export barcode image

2 posts, 0 answers
  1. Stephen
    Stephen avatar
    3 posts
    Member since:
    Sep 2012

    Posted 07 Sep 2013 Link to this post

    hello,
    if I'm using a barcode control in my Win Phone 8 app, am I able to take that rendered image and export it as a bitmap to be used in the Wallet? I can't find any code samples anywhere. Are there any resources for your barcode classes?

    Update:
    I see this functionality exists for the ASP.NET tools, but I don't see the same method for WP8 :(
    http://www.telerik.com/community/forums/aspnet-ajax/barcode/jpg-image-file.aspx#2640511
  2. Stephen
    Stephen avatar
    3 posts
    Member since:
    Sep 2012

    Posted 07 Sep 2013 Link to this post

    I found this blog post which really helped me out. The key piece was missing, but turned out to be simple to solve.
    var element = radBarcode as FrameworkElement;
    var wb = new WriteableBitmap(element, null);
    // wb is a valid BitmapSource you can save to storage
  3. DevCraft banner
Back to Top