ArcGIS Pro SDK文件选择对话框

文件保存对话框

            // 获取默认数据库
            var gdbPath = Project.Current.DefaultGeodatabasePath;
            //设置文件的保存路径
            SaveItemDialog saveLayerFileDialog = new SaveItemDialog()
            {
                Title = "Save Layer File",
                OverwritePrompt = true,//获取或设置当同名文件已存在时是否出现提示。
                InitialLocation = gdbPath,
                Filter = ItemFilters.FeatureClasses_All
            };
            saveLayerFileDialog.ShowDialog();

ArcGIS Pro SDK文件选择对话框_第1张图片

文件选择对话框

            // 获取默认数据库
            var gdbPath = Project.Current.DefaultGeodatabasePath;
            //设置文件的保存路径
            OpenItemDialog openFileDialog = new OpenItemDialog ()
            {
                Title = "open File",
                InitialLocation = gdbPath,
                Filter = ItemFilters.FeatureClasses_All
            };
            openFileDialog .ShowDialog();

参考文献:

SaveItemDialog 类 - ArcGIS Pro

OpenItemDialog 类—ArcGIS Pro

你可能感兴趣的:(arcgisprosdk,arcgis,arcgisprosdk)