ArcGIS Pro 2.8 API Reference Guide
PopupCommand Constructor
Example 

ArcGIS.Desktop.Mapping Namespace > PopupCommand Class : PopupCommand Constructor
The delegate called when the button is clicked.
The delegate called periodically to test if the command should be enabled.
The tooltip for the button.
The image for the button.
Initialize a new instance of a PopupCommand.
Syntax

Parameters

execute
The delegate called when the button is clicked.
canExecute
The delegate called periodically to test if the command should be enabled.
tooltip
The tooltip for the button.
image
The image for the button.
Example
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)
    return;

  //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.ID)),
    p => { return p != null; },
    "My custom command",
    new BitmapImage(new Uri("pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/GenericCheckMark16.png")) as ImageSource));

  mapView.ShowCustomPopup(popups, commands, true);
}
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

PopupCommand Class
PopupCommand Members