/// <summary> /// Load galleries after they have been retrieved from the web service. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="Chucksoft.Silverlight.Controls.GalleryService.GetAllGalleriesCompletedEventArgs"/> instance containing the event data.</param> void galleries_GetAllGalleriesCompleted(object sender, GetAllGalleriesCompletedEventArgs e) { galleries = e.Result; //Check for galleries in the collection. If none exisit display a warning if (galleries.Count > 0) { galleryListBox.ItemsSource = galleries; uploadButton.IsEnabled = true; } else { uploadErrorMessage.Text = "No galleries found, please add a gallery by clicking on the galleries link above."; uploadButton.IsEnabled = false; } }