O'Reilly logo

Windows Application Development Cookbook by Marcin Jamro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Downloading a file from the Internet

When your application needs to present content in the offline mode, it is necessary to download data from the Internet and store them on the device. Of course, such content could consist of text, images, or even movies. However, how can you download images and movies, as well as save them in a device? You will learn it in this recipe.

As an example, you will create a page with the Download a photo button. After clicking on it, you will download a file from a given address and save locally. Of course, you will also handle a scenario when a user does not have an Internet connection or when a remote file does not exist.

Getting ready

To step through this recipe, you need only the automatically generated project. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required