EventSetterHandlerConverter.ConvertFrom Method

Definition

Converts the specified string to a new Delegate for the event handler.

C#
public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext typeDescriptorContext, System.Globalization.CultureInfo cultureInfo, object source);

Parameters

typeDescriptorContext
ITypeDescriptorContext

An ITypeDescriptorContext that provides a format context.

cultureInfo
CultureInfo

The CultureInfo to use as the current culture.

source
Object

The source string to convert.

Returns

A new Delegate that represents the referenced event handler.

Exceptions

The necessary services are not available.

-or-

Could not perform the specific conversion.

typeDescriptorContext or source is null.

Remarks

The typeDescriptorContext must provide services for IRootObjectProvider and IProvideValueTarget.

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