ArcGIS Pro 3.8 API Reference Guide
ArcGIS.Desktop.Presentations Namespace / IPresentationPane Interface / PresentationView Property
Example

In This Topic
    PresentationView Property (IPresentationPane)
    In This Topic
    Gets the presentation view contained within the pane.
    Syntax
    PresentationView PresentationView {get;}
    ReadOnly Property PresentationView As PresentationView
    Example
    Activate a presentation view
    {
      //Assume we want to open a view for a particular presentation or activate a view if one is already open
    
      //A presentation project item is an item that appears in the Presentation folder in the Catalog pane.
      PresentationProjectItem presentationItem = Project.Current.GetItems<PresentationProjectItem>()
                                                 .FirstOrDefault(item => item.Name.Equals("Presentation Name"));
      //Reference a presentation associated with a presentation project item
      if (presentationItem != null)
      {
        //Get the presentation associated with the presentationItem
        Presentation presentationToOpen = await QueuedTask.Run(() => presentationItem.GetPresentation());
    
        //Next check to see if a presentation view is already open that references the presentation
        foreach (var pane in ProApp.Panes)
        {
          var prePane = pane as IPresentationPane;
          if (prePane == null)  // Not a presentation view, continue to the next pane
          {
            continue;
          }
    
          //if there is a match, activate the view
          if (prePane.PresentationView.Presentation == presentationToOpen)
          {
            (prePane as Pane).Activate();
            return;
          }
        }
    
        //No pane found, activate a new one - must be called on UI
        IPresentationPane iNewPresentationPane = await ProApp.Panes.CreatePresentationPaneAsync(presentationToOpen); //GUI thread
      }
    }
    Requirements

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

    ArcGIS Pro version: 3.5 or higher.
    See Also