If the file name and path provided in the Browse dialog conflicts with an existing file and this property is true, a prompt will appear asking if you want to overwrite the existing file. If you click No, indicating you don't want to overwrite the existing file, you have an opportunity to provide a different file name in the Browse dialog box. If you click Yes, the full path to the existing file is returned by the Browse dialog box. Code that generates the output file will have the opportunity to overwrite the existing file.
If the file name and path provided in the Browse dialog conflicts with an existing file and this property is false, a prompt will not appear to ask if you want to overwrite the existing file. Code that generates the output file will have the opportunity to overwrite the existing file.
SaveItemDialog saveMapFileDialog = new SaveItemDialog() { Title = "Save Map File", InitialLocation = @"C:\Data\NewYork\Counties\Maps", DefaultExt = @"mapx", Filter = ItemFilters.maps_all, OverwritePrompt = true }; bool? result = saveMapFileDialog.ShowDialog(); if (result == true) { ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show("Returned file name: " + saveMapFileDialog.FilePath); }
Target Platforms: Windows 10, Windows 8.1, Windows 7