ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.CIM Namespace / BalloonCalloutStyle Enumeration
Example Example

In This Topic
    BalloonCalloutStyle Enumeration
    In This Topic
    Balloon callout styles.
    Syntax
    Members
    MemberDescription
    Oval Oval style.
    Rectangle Rectangle style.
    RoundedRectangle Rounded rectangle style.
    Example
    Snippet Creates a balloon callout text symbol
    /// <summary>
    /// Creates a black banner balloon callout text symbol. The [CIMBalloonCallout](https://pro.arcgis.com/en/pro-app/sdk/api-reference/#topic487.html) created is a rectangular polygon with rounded corners.
    /// ![lineCallOut](https://ArcGIS.github.io/arcgis-pro-sdk/images/Labeling/banner-callout.png)
    /// </summary>
    {
      //create a text symbol
      //Note: Run this code inside a QueuedTask
      var textSymbolBalloonCallout = SymbolFactory.Instance.ConstructTextSymbol(ColorFactory.Instance.WhiteRGB, 11, "Corbel", "Regular");
      //A balloon callout
      var balloonCallout = new CIMBalloonCallout();
      //set the callout's style
      balloonCallout.BalloonStyle = BalloonCalloutStyle.RoundedRectangle;
      //Create a solid fill polygon symbol for the callout.
      var polySymbol = SymbolFactory.Instance.ConstructPolygonSymbol(ColorFactory.Instance.BlackRGB, SimpleFillStyle.Solid);
      //Set the callout's background to be the black polygon symbol
      balloonCallout.BackgroundSymbol = polySymbol;
      //margin inside the callout to place the text
      balloonCallout.Margin = new CIMTextMargin
      {
        Left = 5,
        Right = 5,
        Bottom = 5,
        Top = 5
      };
      //assign the callout to the text symbol's callout property
      textSymbolBalloonCallout.Callout = balloonCallout;
      //Refer to the snippet "How to apply a Text Symbol to labels of a layer" below to see how to apply this text symbol to a label class
    }
    Inheritance Hierarchy

    System.Object
       System.ValueType
          System.Enum
             ArcGIS.Core.CIM.BalloonCalloutStyle

    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also