ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Presentations Namespace / PresentationPage Class / SetBackgroundColor Method
The background color
Example

In This Topic
    SetBackgroundColor Method (PresentationPage)
    In This Topic
    Sets the background color of a presentation page. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Public Sub SetBackgroundColor( _
       ByVal backgroundColor As CIMColor _
    ) 
    public void SetBackgroundColor( 
       CIMColor backgroundColor
    )

    Parameters

    backgroundColor
    The background color
    Exceptions
    ExceptionDescription
    This method must be called within the lambda passed to QueuedTask.Run.
    Example
    Presentation page design
    {
      // create customized margin and color 
      CIMMargin pMargin = new CIMMargin() { Left = 0.2, Right = 0.3, Top = 0.15, Bottom = 0.25 };
      CIMRGBColor pColor = new CIMRGBColor() { R = 255, G = 255, B = 0, Alpha = 50 };
    
      //Reference a page and its transition 
      var pageReference = activePresentationView.Presentation.GetPage(0);
      CIMPresentationTransition transition = page.Transition;
    
      // update the transition style
      transition.TransitionType = PresentationTransitionType.Swipe;
      transition.Duration = 2.0;
      transition.SwipeDirection = SwipeDirection.Top;
    
      //Must be on the QueuedTask
    
      //Set the new margin, new background color and new transition effect
      page.SetMargin(pMargin);
      page.SetBackgroundColor(pColor);
      page.SetTransition(transition);
    }
    Requirements

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

    ArcGIS Pro version: 3.5 or higher.
    See Also