System.Drawing.Design.ToolboxItem.ValidatePropertyValue Method

Validates a property before it is assigned to the property dictionary.

Syntax

protected virtual object ValidatePropertyValue (string propertyName, object value)

Parameters

propertyName
The name of the property to validate.
value
The value against which to validate.

Returns

The value used to perform validation.

Remarks

The ToolboxItem.ValidatePropertyValue(string, object) method is called whenever a value is set in the property dictionary. With this method, you can change the value of an object before committing it, or reject it by throwing an exception.

Requirements

Namespace: System.Drawing.Design
Assembly: System.Drawing (in System.Drawing.dll)
Assembly Versions: 2.0.0.0