private void PreviewPDF(PassFile file)
        {
            MainWindowStackPanel.IsEnabled = false;
            string fileName = $"{PDFDirectory.FullName}\\{file.FileName}";

            Uri url = new Uri($"file:///{fileName}", UriKind.Absolute);

            PDFPreview.Navigate(url);
            PDFPreview.Visibility = Visibility.Visible;
        }
        private void PreviewPDF(PassFile file)
        {
            try
            {
                MainWindowStackPanel.IsEnabled = false;
                string fileName = file.GetFullPath(PDFDirectory);

                Uri url = new Uri($"file:///{fileName}", UriKind.Absolute);
                PDFPreview.Navigate(url);
                PDFPreview.Visibility = Visibility.Visible;
            }
            catch (Exception ex)
            {
                ShowErrorMessage(ex, "previewing PDF");
            }
        }