ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / IElement Interface / IsLocked Property
Example

In This Topic
    IsLocked Property (IElement)
    In This Topic
    Gets the locked state of an element.
    Syntax
    bool IsLocked {get;}
    ReadOnly Property IsLocked As Boolean

    Property Value

    Type: Boolean
    Remarks
    Returns true if an element is checked on in the table of contents.
    Example
    Element_SetLocked
    //Modify an element's locked state if it isn't already
    
    //Perform on the worker thread
    await QueuedTask.Run(() =>
    {
      if (!element.IsLocked)
      {
        element.SetLocked(true);
      }
    });
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also