ArcGIS Pro 2.8 API Reference Guide
GetComponentElements Method
Example 

ArcGIS.Desktop.Framework Namespace > Categories Class : GetComponentElements Method
The name of the category as defined in DAML.
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 10, Windows 8.1

See Also

Reference

Categories Class
Categories Members