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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.