ArcGIS Pro 2.9 API Reference Guide
Filter Property (ItemDialog)
Example 

ArcGIS.Desktop.Catalog Namespace > ItemDialog Class : Filter Property
Gets or sets the filter used to restrict the items listed in the Browse dialog box to the subset that is appropriate for a specific task.
Syntax
public string Filter {get; set;}
Public Property Filter As String
Remarks

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.

Example
/// Adds a single item to a map
OpenItemDialog addToMapDialog = new OpenItemDialog()
{
  Title = "Add To Map",
  InitialLocation = @"C:\Data\NewYork\Counties\Erie\Streets",
  Filter = ItemFilters.composite_addToMap
};
SaveItemDialog saveLayerFileDialog = new SaveItemDialog()
{
  Title = "Save Layer File",
  InitialLocation = @"C:\Data\ProLayers\Geographic\Streets",
  Filter = ItemFilters.layers_allFileTypes
};
Requirements

Target Platforms: Windows 11, Windows 10, Windows 8.1

See Also

Reference

ItemDialog Class
ItemDialog Members