Hi,
I am using CommonSaveFileDialog with the following code lines:
CommonSaveFileDialog dialogSave = new CommonSaveFileDialog();
dialogSave.InitialDirectory = PdfOutputPath;
dialogSave.DefaultFileName = $"{DateTime.Now:yyyyMMdd}_Merged{".pdf"}";
dialogSave.Filters.Add(new CommonFileDialogFilter("PDF-Dokument", $"*.pdf"));
if (dialogSave.ShowDialog() == CommonFileDialogResult.Ok) {
string pdfOutputFile = dialogSave.FileName;
}
But if I enter as filename without the file extension (.pdf), e.g. 'Ummeldung 01.01.2024 THURNHOFER' it will be cutted to 'Ummeldung 01.01.' - '.2024' will be interpreted as file extension from my filename.
I can prevent this behaviour, if I set
dialogSave.DefaultExtension = ".pdf";
but it seems to me, that it is a bug!
Best regards, Karl