OpacityConverter::ConvertFrom Method (ITypeDescriptorContext^, CultureInfo^, Object^)
Converts the specified object to the converter's native type.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
public: virtual Object^ ConvertFrom( ITypeDescriptorContext^ context, CultureInfo^ culture, Object^ value ) override
Parameters
- context
-
Type:
System.ComponentModel::ITypeDescriptorContext^
A ITypeDescriptorContext that provides information about the context of a type converter.
- culture
-
Type:
System.Globalization::CultureInfo^
The locale information for the conversion.
- value
-
Type:
System::Object^
The object to convert.
| Exception | Condition |
|---|---|
| Exception | The object was not a supported type for the conversion. |
| FormatException | value could not be properly converted to type Double. -or- The resulting converted value was less than zero percent or greater than one hundred percent. |
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.
Available since 1.1