XmlLanguageConverter::ConvertFrom Method (ITypeDescriptorContext^, CultureInfo^, Object^)
Converts the specified string value to the XmlLanguage type supported by this converter.
Assembly: PresentationCore (in PresentationCore.dll)
public: virtual Object^ ConvertFrom( ITypeDescriptorContext^ typeDescriptorContext, CultureInfo^ cultureInfo, Object^ source ) override
Parameters
- typeDescriptorContext
-
Type:
System.ComponentModel::ITypeDescriptorContext^
An ITypeDescriptorContext that provides a format context.
- cultureInfo
-
Type:
System.Globalization::CultureInfo^
The CultureInfo to use as the current culture.
- source
-
Type:
System::Object^
The string to convert.
| Exception | Condition |
|---|---|
| InvalidOperationException | Conversion could not be performed. |
The source value must be a string, otherwise an exception is thrown. If the conversion is successful, the return value is a XmlLanguage.
Internally, this method calls XmlLanguage::GetLanguage. See GetLanguage for additional exception information.
Available since 3.0