Practical development skills for Windows Phone (1): Save and load images

Source: Internet
Author: User
In Windows Phone, we may have the following requirement: custom applications Program.

The actual process is as follows: select an image, save it to an isolated bucket, and load the image to make it a background image at the next startup or immediately.

The following uses a specific demo to implement this requirement:

Create a Windows Phone project, drag and drop two buttons on the interface, named "open" and "LOAD". One button is used to open the local image, and the other button is used to copy and set the background image.

Click the OPEN button to open the local image, that is, to start an event in the photochoosertask button. CodeAs follows:

Click the Load button to read the image from the isolated bucket and set it as the background of the application. The Load button Event code is as follows:

Let's take a look at the two encapsulated methods:

Save images to local storage

Read images from local storage

OK, test it...Source code:
WP7 save and load images

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.