ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Framework Namespace / Categories Class / GetComponentElements Method
The name of the category as defined in DAML.
Example

In This Topic
    GetComponentElements Method
    In This Topic
    Retrieves components registered in a component category.
    Syntax
    public static Collection<ComponentElement> GetComponentElements( 
       string category
    )
    Public Shared Function GetComponentElements( _
       ByVal category As String _
    ) As Collection(Of ComponentElement)

    Parameters

    category
    The name of the category as defined in DAML.

    Return Value

    The elements registered in the category.
    Example
    Collection<ArcGIS.Desktop.Framework.ComponentElement> components;
    components = Categories.GetComponentElements("ProjectContainers");
    
    // Check the components
    foreach (ComponentElement component in components)
    {
    string value = component.ReadAttribute("type");
    if (value != key)
    continue;
    
    ProjectItemContainer container = null;
    try
    {
    container = component.CreateComponent() as ProjectItemContainer;
    if (container == null)
    return null;
    .
    .
    .
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also