public void AddFilter( BrowseProjectFilter filter )
Public Sub AddFilter( _ ByVal filter As BrowseProjectFilter _ )
Parameters
- filter
public void AddFilter( BrowseProjectFilter filter )
Public Sub AddFilter( _ ByVal filter As BrowseProjectFilter _ )
BrowseProjectFilter portalAndLocalProjectsFilter = new BrowseProjectFilter(); //A filter to pick projects from the portal //This filter will allow selection of ppkx and portal project items on the portal portalAndLocalProjectsFilter.AddFilter(BrowseProjectFilter.GetFilter("esri_browseDialogFilters_projects_online_proprojects")); //A filter to pick projects from the local machine portalAndLocalProjectsFilter.AddFilter(BrowseProjectFilter.GetFilter("esri_browseDialogFilters_projects")); //Create the OpenItemDialog and set the filter to the one we just created var openDlg = new OpenItemDialog() { Title = "Select a Project", MultiSelect = false, BrowseFilter = portalAndLocalProjectsFilter }; //Show the dialog var result = openDlg.ShowDialog(); //Check if the user clicked OK and selected an item bool? ok = openDlg.ShowDialog(); if (!ok.HasValue || openDlg.Items.Count() == 0) return; //nothing selected var selectedItem = openDlg.Items.FirstOrDefault(); //Open the project use the OpenAsync method.
Target Platforms: Windows 11, Windows 10