/// <summary> /// When image is selected enable/disable setting /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void selectedImageList_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (slideshowImageList.SelectedItem != null) { int index = slideshowImageList.SelectedIndex; buttonRemoveImage.IsEnabled = true; textBoxImageText.IsEnabled = true; textBoxImageText.Text = selectedSlideShow.GetDescription(index); if (selectedSlideShow.GetAt(index) is ImageData) { textBoxDuration.IsEnabled = true; textBoxDuration.Text = selectedSlideShow.GetDuration(index).ToString(); } } else { buttonRemoveImage.IsEnabled = false; textBoxImageText.Text = string.Empty; textBoxImageText.IsEnabled = false; textBoxDuration.Text = string.Empty; textBoxDuration.IsEnabled = false; } }