How to avoid checking file name in SaveFileDialog C #

Can I avoid checking the file name 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 does not work. In any case, when I print a name with invalid characters, its own popup window "Invalid file name" appears in the dialog box. Can i avoid it? How?

+4
source share

Source: https://habr.com/ru/post/1533578/


All Articles