ArcGIS Pro 3.8 API Reference Guide
ArcGIS.Core.CIM Namespace / CIMGraphicFrame Class / BackgroundSymbol Property
Example

In This Topic
    BackgroundSymbol Property (CIMGraphicFrame)
    In This Topic
    Gets or sets the background symbol of the graphic frame.
    Syntax
    public CIMSymbolReference BackgroundSymbol {get; set;}
    Public Property BackgroundSymbol As CIMSymbolReference
    Example
    Apply a Background Color to a MapFrame
    {
      //Apply a background color to the map frame element using the CIM.
      await QueuedTask.Run(() =>
      {
      //Get the map frame's definition in order to modify the background.
      var mapFrameDefn = mapFrame.GetDefinition() as CIMMapFrame;
    
      //Construct the polygon symbol to use to create a background
      var polySymbol = SymbolFactory.Instance.ConstructPolygonSymbol(
                      ColorFactory.Instance.BlueRGB, SimpleFillStyle.Solid);
    
      //Set the background
      mapFrameDefn.GraphicFrame.BackgroundSymbol =
                                        polySymbol.MakeSymbolReference();
    
      //Set the map frame definition
      mapFrame.SetDefinition(mapFrameDefn);
      });
    }
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also