ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Desktop.Core Namespace / LayoutOptions Class / KeepLastToolActive Property
Example

In This Topic
    KeepLastToolActive Property
    In This Topic
    Gets and sets whether the insert tool stays active or reverts back to select after adding a new element.
    Syntax
    public bool KeepLastToolActive {get; set;}
    Public Property KeepLastToolActive As Boolean
    Example
    Get LayoutOptions
    var lastToolActive = ApplicationOptions.LayoutOptions.KeepLastToolActive;
    var warnOnSurrounds = ApplicationOptions.LayoutOptions.WarnAboutAssociatedSurrounds;
    //eg <Install_Path>\Resources\LayoutTemplates\en-US
    var gallery_path = ApplicationOptions.LayoutOptions.LayoutTemplatePath;
    
    Set LayoutOptions
    //keep graphic element insert tool active
    ApplicationOptions.LayoutOptions.KeepLastToolActive = true;
    //no warning when deleting a map frame results in other elements being deleted
    ApplicationOptions.LayoutOptions.WarnAboutAssociatedSurrounds = false;
    //path to .pagx files used as templates
    ApplicationOptions.LayoutOptions.LayoutTemplatePath = @"D:\data\layout_templates";
    
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also