问题
Is it possible to avoid of fileName validation in SaveFileDialog?
var saveFileDialog = new SaveFileDialog {
Filter = "Job package (*.job)|*.job",
CheckPathExists = false,
ValidateNames = false };
var result = saveFileDialog.ShowDialog();
if (result.Value)
{
....my own validation....
}
The ValidateNames property doesn't work. Anyway, when I type a name with invalid characters, the dialog shows it's own popup "The file name is not valid". Can I avoid it? How?
来源:https://stackoverflow.com/questions/22667972/how-to-avoid-of-file-name-validation-in-savefiledialog-c-sharp