ArcGIS Pro 2.8 API Reference Guide
ShowCustomPopup(IEnumerable<PopupContent>,IEnumerable<PopupCommand>,Boolean,PopupDefinition) Method
Example 

ArcGIS.Desktop.Mapping Namespace > MapView Class > ShowCustomPopup Method : ShowCustomPopup(IEnumerable<PopupContent>,IEnumerable<PopupCommand>,Boolean,PopupDefinition) Method
The content to be displayed in the pop-up.
The collection of commands to show at the bottom of the pop-up.
A value indicating if the default pop-up commands should display.
A class to set additional properties for the popup. When set to null, default values will be used.
Show a custom pop-up. This method must be called on the UI thread.
Syntax

Parameters

popupContent
The content to be displayed in the pop-up.
commands
The collection of commands to show at the bottom of the pop-up.
includeDefaultCommands
A value indicating if the default pop-up commands should display.
popupDef
A class to set additional properties for the popup. When set to null, default values will be used.
Exceptions
ExceptionDescription
Popups must be created on the UI thread
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

MapView Class
MapView Members
Overload List