The FilePath property is set as a result of browsing in the dialog box to a location and providing a name for the new file that will be created. You can get the property's value after dismissing the Browse dialog box.
The value returned from the FilePath property is the full path to the file and its file name. The path is determined based on the location currently being viewed in the Browse dialog, which is extracted from the breadcrumb control. The file name includes the file extension that was specified in the Name text box or was defined as the default file extension for the dialog box.
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 11, Windows 10, Windows 8.1