ArcGIS Pro 3.8 API Reference Guide
ArcGIS.Desktop.Editing.Attributes Namespace / Attribute Class / IsVisible Property
Example

In This Topic
    IsVisible Property (Attribute)
    In This Topic
    Gets whether this attribute is visible.
    Syntax
    public bool IsVisible {get;}
    Public ReadOnly Property IsVisible As Boolean
    Example
    Get a layers schema using Inspector
    // Loads the schema of the specified feature layer and iterates through its attributes,  providing access to their properties such as field name, alias, type, and other metadata.
    await QueuedTask.Run(() =>
    {
      // create an instance of the inspector class
      var inspector = new Inspector();
      // load the layer
      inspector.LoadSchema(featureLayer);
      // iterate through the attributes, looking at properties
      foreach (var attribute in inspector)
      {
        var fldName = attribute.FieldName;
        var fldAlias = attribute.FieldAlias;
        var fldType = attribute.FieldType;
        int idxFld = attribute.FieldIndex;
        var fld = attribute.GetField();
        var isNullable = attribute.IsNullable;
        var isEditable = attribute.IsEditable;
        var isVisible = attribute.IsVisible;
        var isSystemField = attribute.IsSystemField;
        var isGeometryField = attribute.IsGeometryField;
      }
    });
    Using the custom inspector provider class
    /// <summary>
    /// Demonstrates the use of a custom InspectorProvider to create and load an inspector for a specific feature.
    /// </summary>
    public static async void InspectorProviderExample(FeatureLayer featureLayer, long objectId)
    {
      var provider = new MyProvider();
      Inspector _featureInspector = provider.Create();
      //Create an embed-able control from the inspector class to display on the pane
      var icontrol = _featureInspector.CreateEmbeddableControl();
    
      await _featureInspector.LoadAsync(featureLayer, objectId);
      var attribute = _featureInspector.Where(a => a.FieldName == "FontStyle").FirstOrDefault();
      var visibility = attribute.IsVisible; //Will return false
    
      attribute = _featureInspector.Where(a => a.FieldName == "ZOrder").FirstOrDefault();
      var highlighted = attribute.IsHighlighted; //Will return true
    }
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also