c# - Bypassing save dialog box in WPF application -
i trying bypass save dialog box when using savefiledialog class. want able write document without having prompt user decide if want save or not, file should automatically save when click button.
savefiledialog savefiledialog1 = new savefiledialog(); savefiledialog1.filter = "txt files (*.txt)|*.txt|all files (*.*)|*.*" ; savefiledialog1.restoredirectory = true ; savefiledialog1.initialdirectory = @"c:\"; if(savefiledialog1.showdialog() == dialogresult.ok) { // code write stream goes here. }
i have tried removing if statement using...
savefiledialog1.createprompt = false;
nothing seems work... ideas?
i think want bypass overwrite prompt dialog.
in case can use
savefiledialog1.overwriteprompt = false;
otherwise, don't need savefiledialog , can save stream without using it.
Comments
Post a Comment