SaveFileDialog.InitialDirectory
property · SaveFileDialog · cAlgo.API Since 5.1
DesktopCLICloud
Gets or sets the initial directory that is displayed by a file dialog.
Environment behaviour
CLI — not supported. No dialog can be shown in the CLI: ShowDialog returns FileDialogResult.None, nothing is written and the dialog settings are only stored.
Cloud — not supported. No dialog can be shown in the cloud: ShowDialog returns FileDialogResult.None, nothing is written and the dialog settings are only stored.
Definition
public string InitialDirectory {get; set;}
saveFileDialog.InitialDirectory: str
Returns string
Examples
var saveFileDialog = new SaveFileDialog { InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) };
saveFileDialog.ShowDialog();
from System import Environment
saveFileDialog = SaveFileDialog()
saveFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
saveFileDialog.ShowDialog()