ArcGIS Pro 3.8 API Reference Guide
ArcGIS.Desktop.Editing.Attributes Namespace / Inspector Class / LoadAsync Method / LoadAsync(MapMember,Int64) Method
mapMember
object ID
Example

In This Topic
    LoadAsync(MapMember,Int64) Method
    In This Topic
    Load a single row or feature into the inspector.
    Syntax
    public Task LoadAsync( 
       MapMember member,
       long oid
    )
    Public Overloads Function LoadAsync( _
       ByVal member As MapMember, _
       ByVal oid As Long _
    ) As Task

    Parameters

    member
    mapMember
    oid
    object ID
    Example
    Load a feature from a layer into the inspector
    {
      // Loads a feature from the specified feature layer into an Inspector instance.
      // create an instance of the inspector class
      var inspector = new Inspector();
      // load the feature with ObjectID 'objectId' into the inspector
      await inspector.LoadAsync(featureLayer, objectId);
    }
    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