ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / PopupContent Class / PopupContent Constructor / PopupContent Constructor(MapMember,Int64)
MapMember associated with the pop-up.
The object id of the feature or row to show in the pop-up.
Example

In This Topic
    PopupContent Constructor(MapMember,Int64)
    In This Topic
    Initialize a new instance of PopupContent.
    Syntax
    Public Function New( _
       ByVal mapMember As MapMember, _
       ByVal oid As Long _
    )
    public PopupContent( 
       MapMember mapMember,
       long oid
    )

    Parameters

    mapMember
    MapMember associated with the pop-up.
    oid
    The object id of the feature or row to show in the pop-up.
    Example
    Show A pop-up With Custom Commands
    {
      //Create custom popup content from existing map member and object id
      List<PopupContent> popups = [new PopupContent(mapMember, objectID)];
    
      //Create a new custom command to add to the popup window
      List<PopupCommand> commands =
      [
        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);
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also