IComponentDiscoveryService::GetComponentTypes Method (IDesignerHost^, Type^)
Gets the list of available component types.
Assembly: System (in System.dll)
Parameters
- designerHost
-
Type:
System.ComponentModel.Design::IDesignerHost^
The designer host providing design-time services. Can be null.
- baseType
-
Type:
System::Type^
The base type specifying the components to retrieve. Can be null.
The GetComponentTypes method retrieves the list of available component types, which are types implementing the IComponent interface. If the baseType parameter is null, all components are retrieved; otherwise, only component types derived from baseType are returned.
When you pass in a value for the designerHost parameter, type resolution is scoped to designerHost. This means that if there is a ToolboxItem whose type is on disk, and not in the global assembly cache, its type will fail to load through designerHost.
If you pass in null for designerHost, it returns all types that can be queried from the global assembly cache or the Assembly::LoadFrom method.
The following code example demonstrates how to use the GetComponentTypes method to find all the types that derive from the ScrollableControl type.
Available since 2.0