ArcGIS Pro 3.5 API Reference Guide
ArcGIS.Desktop.Presentations Namespace / PresentationView Class / ActivateMapPageAsync Method
Example

In This Topic
    ActivateMapPageAsync Method
    In This Topic
    Activates the map on the presentation view. Only a map page can be activated. This method must be called on the UI thread.
    Syntax
    public Task<bool> ActivateMapPageAsync()
    Public Function ActivateMapPageAsync() As Task(Of Boolean)

    Return Value

    A flag indicating whether the map is activated
    Example
    Activate a map page
    // Note: we are on the UI thread!
    // A presentation view must be active
    if (PresentationView.Active == null)
      return;
    PresentationPage activePage = activePresentationView.ActivePage;
    
    //check if the current page is a map page
    if (activePage is MapPresentationPage)
    {
      await activePresentationView.ActivateMapPageAsync();
    }
    
    //move to the QueuedTask to do something
    await QueuedTask.Run(() =>
    {
      // TODO
    });
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.5 or higher.
    See Also