ParentControlDesigner.CanAddComponent(IComponent) Method

Definition

Called when a component is added to the parent container.

C#
protected internal virtual bool CanAddComponent(System.ComponentModel.IComponent component);

Parameters

component
IComponent

The component to test for errors.

Returns

true if component can be added; otherwise, false.

Remarks

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.

Applies to

Product Versions
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10