Exemple #1
0
        /// <summary>
        /// Executed event handler for stop command
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">Event arguments describing the event.</param>
        private static void OnStopCommandExecuted(object sender, ExecutedRoutedEventArgs e)
        {
            if (!e.Handled)
            {
                PhotoSlideShowControl slideShow = sender as PhotoSlideShowControl;
                if (slideShow != null)
                {
                    // Stop the timer, change the photo, move to the next photo and restart timer
                    slideShow.NavigateToPhoto();
                    e.Handled = true;

                    slideShow.IsStopped = true;
                }
            }
        }