ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / PopupCommand Class
Members Example

In This Topic
    PopupCommand Class
    In This Topic
    Represents a button shown at the bottom of the pop-up window.
    Show A pop-up With Custom Commands
    public void ShowCustomPopup(MapMember mapMember, long objectID)
      //Get the active map view.
      var mapView = MapView.Active;
      if (mapView == null)
      //Create custom popup content from existing map member and object id
      var popups = new List<PopupContent>();
      popups.Add(new PopupContent(mapMember, objectID));
      //Create a new custom command to add to the popup window
      var commands = new List<PopupCommand>();
      commands.Add(new PopupCommand(
        p => MessageBox.Show(string.Format("Map Member: {0}, ID: {1}", p.MapMember, p.IDString)),
        p => { return p != null; },
        "My custom command",
        System.Windows.Application.Current.Resources["GenericCheckMark16"] as ImageSource));
      mapView.ShowCustomPopup(popups, commands, true);
    Inheritance Hierarchy



    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also