ArcGIS Pro 3.1 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / LegendStyleItem Class
Members Example

In This Topic
    LegendStyleItem Class
    In This Topic
    Represents a legend saved in a style.
    Object Model
    LegendStyleItem ClassCIMLegend Class
    Syntax
    Example
    How to search for legends in a style
    public Task<IList<LegendStyleItem>> GetLegendFromStyleAsync(StyleProjectItem style, string searchString)
    {
      if (style == null)
        throw new System.ArgumentNullException();
    
      return QueuedTask.Run(() => style.SearchLegends(searchString));
    }
    Inheritance Hierarchy

    System.Object
       ArcGIS.Desktop.Framework.Contracts.PropertyChangedBase
          ArcGIS.Desktop.Mapping.StyleItem
             ArcGIS.Desktop.Mapping.LegendStyleItem

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.0 or higher.
    See Also