I have created Filter with this code:
saveFileDialog1.FileName = "SimplifiedLog";
saveFileDialog1.Filter = "RichTextFormate | *.rtf |Text Files | *.txt |All Files| *.*";
saveFileDialog1.Title = "Save Simplified KL File";
saveFileDialog1.ShowDialog();
The problem is that every time I select any filter (Other than the selected one) it adds extension in the previous one. See Picture below:
You should remove the spaces:
saveFileDialog1.Filter = "RichTextFormate|*.rtf|Text Files|*.txt|All Files|*.*";
The spaces after and before |
are evaluated as is, so you should not add them if not necessary.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With