ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / IElement Interface / SetVisible Method
Boolean
Example

In This Topic
    SetVisible Method (IElement)
    In This Topic
    Sets the visibility of an element on a page layout. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    void SetVisible( 
       bool isVisible
    )
    Sub SetVisible( _
       ByVal isVisible As Boolean _
    ) 

    Parameters

    isVisible
    Boolean
    Exceptions
    ExceptionDescription
    This method must be called within the lambda passed to QueuedTask.Run.
    Remarks
    A value of true displays the element on the page layout.
    Example
    Element_SetVisible
    //Modify an element's visibility.
    
    //Perform on the worker thread
    await QueuedTask.Run(() =>
    {
      element.SetVisible(true);  //Turn it on / make visible.
    });
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also