ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / PopupDefinition Class
Members Example

In This Topic
    PopupDefinition Class
    In This Topic
    Describes a popup definition.
    Syntax
    public class PopupDefinition 
    Public Class PopupDefinition 
    Example
    Show a pop-up for a feature using pop-up window properties
    public void ShowPopupWithWindowDef(MapMember mapMember, long objectID)
    {
      if (MapView.Active == null) return;
      // Sample code: https://github.com/ArcGIS/arcgis-pro-sdk-community-samples/blob/master/Map-Exploration/CustomIdentify/CustomIdentify.cs
      var topLeftCornerPoint = new System.Windows.Point(200, 200);
      var popupDef = new PopupDefinition()
      {
        Append = true,      // if true new record is appended to existing (if any)
        Dockable = true,    // if true popup is dockable - if false Append is not applicable
        Position = topLeftCornerPoint,  // Position of top left corner of the popup (in pixels)
        Size = new System.Windows.Size(200, 400)    // size of the popup (in pixels)
      };
      MapView.Active.ShowPopup(mapMember, objectID, popupDef);
    }
    
    Show a custom pop-up using pop-up window properties
    public void ShowCustomPopupWithWindowDef()
    {
      if (MapView.Active == null) return;
    
      //Create custom popup content
      var popups = new List<PopupContent>
            {
                new PopupContent("<b>This text is bold.</b>", "Custom tooltip from HTML string"),
                new PopupContent(new Uri("http://www.esri.com/"), "Custom tooltip from Uri")
            };
      // Sample code: https://github.com/ArcGIS/arcgis-pro-sdk-community-samples/blob/master/Framework/DynamicMenu/DynamicFeatureSelectionMenu.cs
      var topLeftCornerPoint = new System.Windows.Point(200, 200);
      var popupDef = new PopupDefinition()
      {
        Append = true,      // if true new record is appended to existing (if any)
        Dockable = true,    // if true popup is dockable - if false Append is not applicable
        Position = topLeftCornerPoint,  // Position of top left corner of the popup (in pixels)
        Size = new System.Windows.Size(200, 400)    // size of the popup (in pixels)
      };
      MapView.Active.ShowCustomPopup(popups, null, true, popupDef);
    }
    
    Inheritance Hierarchy

    System.Object
       ArcGIS.Desktop.Mapping.PopupDefinition

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also