ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Layouts.Events Namespace / LayoutEventArgs Class / OldPage Property
Example

In This Topic
    OldPage Property
    In This Topic
    Gets the original layout ArcGIS.Core.CIM.CIMPage
    Syntax
    public CIMPage OldPage {get;}
    Public ReadOnly Property OldPage As CIMPage
    Example
    LayoutEvent_PageChanged
    //Report the event args when a layout page properties are changed.
    
    //At 2.x - ArcGIS.Desktop.Layouts.Events.PageChangedEvent.Subscribe((args) =>
    //{
    //  System.Windows.MessageBox.Show("PageChangedEvent:" +
    //  Environment.NewLine +
    //  "   arg Layout: " + args.Layout.Name +
    //  Environment.NewLine +
    //  "   arg New CIMPage (height): " + args.NewPage.Height.ToString() +
    //  Environment.NewLine +
    //  "   arg Old CIMPage (height): " + args.OldPage.Height.ToString());
    //});
    
    ArcGIS.Desktop.Layouts.Events.LayoutEvent.Subscribe((args) =>
    {
      var layout = args.Layout;
      if (args.Hint == LayoutEventHint.PageChanged)
      {
        var cimPage = args.OldPage;
        System.Diagnostics.Debug.WriteLine($"LayoutEvent {args.Hint.ToString()}: {layout.Name}");
      }
    });
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also