SizeFConverter.CanConvertFrom Method (ITypeDescriptorContext, Type)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Returns a value indicating whether the converter can convert from the type specified to the SizeF type, using the specified context.

Namespace:   System.Drawing
Assembly:  System.Drawing (in System.Drawing.dll)

public override bool CanConvertFrom(
	ITypeDescriptorContext context,
	Type sourceType


Type: System.ComponentModel.ITypeDescriptorContext

An ITypeDescriptorContext through which additional context can be supplied.

Type: System.Type

A Type the represents the type you wish to convert from.

Return Value

Type: System.Boolean

true to indicate the conversion can be performed; otherwise, false.

If the specified type is a String, this method will always return true.

.NET Framework
Available since 2.0
Return to top