ParentControlDesigner.CanAddComponent Method (IComponent)

.NET Framework (current version)

This API supports the product infrastructure and is not intended to be used directly from your code.

Called when a component is added to the parent container.

Namespace:   System.Windows.Forms.Design
Assembly:  System.Design (in System.Design.dll)

protected internal virtual bool CanAddComponent(
	IComponent component


Type: System.ComponentModel.IComponent

The component to test for errors.

Return Value

Type: System.Boolean

true if component can be added; otherwise, false.

Similar to the IsDropOK method, but allows for specific error messages. This method provides a chance to display the same error as is displayed at runtime.

.NET Framework
Available since 4.0
Return to top