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 ...

Get Windows® Phone 8 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.