The items available in the Browse dialog box may be filtered to ensure only items appropriate for a specific task are presented. For example, when the Browse dialog box is used to set a tool's parameter, the parameter may require the item to be set to a point feature class or a raster dataset. Items are filtered by specifying a filter or providing the identifier of a browse dialog filter defined in DAML.
{
// Variables not used in samples
OpenItemDialog selectItemDialog = new(); // in #region BrowseDialogItems
// Adds a single item to a map
OpenItemDialog addToMapDialog = new()
{
Title = "Add To Map",
InitialLocation = @"C:\Data\NewYork\Counties\Erie\Streets",
Filter = ItemFilters.Composite_AddToMap
};
}
{
SaveItemDialog saveLayerFileDialog = new()
{
Title = "Save Layer File",
InitialLocation = @"C:\Data\ProLayers\Geographic\Streets",
Filter = ItemFilters.Files_All
};
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)