O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

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

Saving the Image

After processing is complete, the user is provided with the means to save the image via an application bar icon button. The page contains an ICommand called SaveCommand, as shown:

readonly ICommand saveCommand;public ICommand SaveCommand{    get    {        return saveCommand;    }}

The command is instantiated in the constructor and when executed calls the page’s SaveImage method, which is shown in the following excerpt:

public MainPage(){    InitializeComponent();    saveCommand = new DelegateCommand(obj => SaveImage());    DataContext = this;    photoChooserTask.Completed += HandlePhotoChooserTaskCompleted;}

The SaveImage method retrieves the WriteableBitmap from the Image control and then uses ...

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