Exemplo n.º 1
0
        internal void Download()
        {
            if (SelectedPhoto == null)
            {
                return;
            }

            LiveConnectClient downloadClient = new LiveConnectClient(App.Session);

            downloadClient.BackgroundDownloadCompleted +=
                new EventHandler <LiveOperationCompletedEventArgs>(downloadClient_BackgroundDownloadCompleted);

            string path             = SelectedPhoto.ID + "/content";
            Uri    downloadLocation = new Uri("/shared/transfers/" + SelectedPhoto.Title, UriKind.RelativeOrAbsolute);
            string userState        = SelectedPhoto.ID; // arbitrary string to uniquely identify the request.

            downloadClient.BackgroundDownload(path, downloadLocation, userState);
        }