/// <summary>
 /// Save duration when moving away from textbox
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void textBoxDuration_LostFocus(object sender, RoutedEventArgs e)
 {
     if (slideshowImageList.SelectedItem != null)
     {
         int index    = slideshowImageList.SelectedIndex;
         int duration = -1;
         if (int.TryParse(textBoxDuration.Text, out duration))
         {
             selectedSlideShow.SetDuration(index, duration);
         }
     }
 }