OpacityConverter::CanConvertFrom Method (ITypeDescriptorContext^, Type^)
.NET Framework (current version)
Returns a value indicating whether this converter can convert an object of the specified source type to the native type of the converter that uses the specified context.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
public: virtual bool CanConvertFrom( ITypeDescriptorContext^ context, Type^ sourceType ) override
Parameters
- context
-
Type:
System.ComponentModel::ITypeDescriptorContext^
A ITypeDescriptorContext that provides information about the context of a type converter.
- sourceType
-
Type:
System::Type^
The Type that represents the type you want to convert from.
Return Value
Type: System::Booleantrue if this converter can perform the conversion; otherwise, false.
Notes to Inheritors:
Override this method to provide your own conversion requirements.
You can use the context parameter to extract additional information about the environment this converter is being invoked from. The parameter may be null, so you should always verify the contents. Also, properties on the ITypeDescriptorContext may also return null.
.NET Framework
Available since 1.1
Available since 1.1
Show: