private void HandleSave(object sender, ExecutedRoutedEventArgs e)
        {
            var dpiText = ((TextBlock)((ComboBoxItem)this.dpiBox.SelectedItem).Content).Text;

            var filename = "SnoopScreenshot";

            if (this.DataContext is FrameworkElement element &&
                string.IsNullOrEmpty(element.Name) == false)
            {
                filename = $"SnoopScreenshot_{element.Name}";
            }

            filename += "_" + dpiText;

            filename += ".png";

            var filePath = Path.Combine(lastSaveDirectory, filename);

            var fileDialog = new SaveFileDialog
            {
                AddExtension     = true,
                CheckPathExists  = true,
                DefaultExt       = "png",
                InitialDirectory = Path.GetDirectoryName(filePath),
                FileName         = Path.GetFileNameWithoutExtension(filePath),
                Filter           = "Image File (*.png)|*.png",
                FilterIndex      = 0
            };

            if (fileDialog.ShowDialog(this).Value)
            {
                lastSaveDirectory = Path.GetDirectoryName(fileDialog.FileName);

                VisualCaptureUtil.SaveVisual(this.DataContext as Visual,
                                             int.Parse(dpiText),
                                             filePath);

                this.Close();
            }
        }