This is a migrated thread and some comments may be shown as answers.

Export barcode image

1 Answer 81 Views
BarCode
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Stephen
Top achievements
Rank 1
Stephen asked on 07 Sep 2013, 09:20 PM
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

1 Answer, 1 is accepted

Sort by
0
Stephen
Top achievements
Rank 1
answered on 07 Sep 2013, 11:12 PM
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
Tags
BarCode
Asked by
Stephen
Top achievements
Rank 1
Answers by
Stephen
Top achievements
Rank 1
Share this question
or