(X) Hide this Upcoming webinar by Brian Noyes: Querying and Updating Data From Silverlight Clients with WCF RIA Services. February 2nd, 10 am PST (see your local time)
Full webinar info | Register | Read WCF RIA Services Article series by Brian Noyes
Become a member to receive all webinar news by email, or follow all webinar news on Twitter | Facebook | LinkedIn
Skip Navigation LinksHome / News / View News

Silverlight for Windows Phone Programming Tip #1

+ Add to SilverlightShow Favorites
0 comments   /   posted by Silverlight Show on Jan 27, 2011
(0 votes)

SilverlightShow Page for all Silverlight and Windows Phone 7 (WP7) things on TwitterJeff Prosise is starting a new series of little WP7 tips that can save you time, reduce aggravation, and help you build better apps.

Source: Jeff Prosise's Blog

The Silverlight for Windows Phone documentation contains a helpful article demonstrating how to encode a WriteableBitmap as a JPEG and use the XNA framework’s MediaLibrary class to save it in the phone’s pictures library. The code works, but it’s way more work than you have to do.

Rather than create a temporary file in isolated storage, write the JPEG into the temporary file, transfer the JPEG from isolated storage into the pictures library, and then delete the file per the example in the documentation, you can accomplish the same thing with four lines of code.


Comments RSS RSS
No comments

Add Comment


Please add 2 and 7 and type the answer here: