ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / MapViewOverlayControl Class / MapViewOverlayControl Constructor
Example

In This Topic
    MapViewOverlayControl Constructor
    In This Topic
    Sets the properties for IMapViewOverlayControl.
    Syntax

    Parameters

    control
    canMove
    canResizeHorizontally
    canResizeVertically
    relativePosition
    initialXRatio
    initialYRatio
    Example
    MapView Overlay Control
    {
      //Create a Progress Bar user control
      System.Windows.Controls.ProgressBar progressBarControl = new()
      {
        //Configure the progress bar
        Minimum = 0,
        Maximum = 100,
        IsIndeterminate = true,
        Width = 300,
        Value = 10,
        Height = 25,
        Visibility = System.Windows.Visibility.Visible
      };
      //Create a MapViewOverlayControl. 
      var mapViewOverlayControl = new MapViewOverlayControl(progressBarControl, true, true, true, OverlayControlRelativePosition.BottomCenter, .5, .8);
      //Add to the active map
      MapView.Active.AddOverlayControl(mapViewOverlayControl);
      // Note: Needs QueuedTask to run
      {
        //Wait 3 seconds to remove the progress bar from the map.
        Thread.Sleep(3000);
      }
      //Remove from active map
      MapView.Active.RemoveOverlayControl(mapViewOverlayControl);
    }
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also