ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Catalog Namespace / ItemDialog Class / InitialLocation Property
Example

In This Topic
    InitialLocation Property
    In This Topic
    Gets or sets the initial location to display in the Browse dialog box.
    Syntax
    Public Property InitialLocation As String
    public string InitialLocation {get; set;}
    Example
    OpenItemDialog
    {
      // 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
    {
      SaveItemDialog saveLayerFileDialog = new()
      {
        Title = "Save Layer File",
        InitialLocation = @"C:\Data\ProLayers\Geographic\Streets",
        Filter = ItemFilters.Files_All
      };
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also