private void PreviousImage()
        {
            currentIndex = currentIndex == 0 ? files.Count - 2 : currentIndex - 2;

            SwitchImage();

            if (!paused)
            {
                timer.Restart();
            }
        }
        /// <summary>
        /// When any filter condition has changed restart the evaluation timer to defer
        /// the evaluation until the user has stopped typing.
        /// </summary>
        internal void OnFilterChanged()
        {
            if (!_isFilteringEnabled)
            {
                return;
            }

            // Ensure that no cell is in editing state, this would cause an exception when trying to change the filter!
            _dataGrid.CommitEdit(); // Commit cell
            _dataGrid.CommitEdit(); // Commit row

            if (_deferFilterEvaluationTimer == null)
            {
                var throttleDelay = _dataGrid.GetFilterEvaluationDelay();
                _deferFilterEvaluationTimer = new DispatcherTimer(throttleDelay, DispatcherPriority.Input, (_, __) => EvaluateFilter(), Dispatcher.CurrentDispatcher);
            }

            _deferFilterEvaluationTimer.Restart();
        }