XmlLanguageConverter.ConvertFrom Method (ITypeDescriptorContext, CultureInfo, Object)

 

Converts the specified string value to the XmlLanguage type supported by this converter.

Namespace:   System.Windows.Markup
Assembly:  PresentationCore (in PresentationCore.dll)

public override object ConvertFrom(
	ITypeDescriptorContext typeDescriptorContext,
	CultureInfo cultureInfo,
	object source
)

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.

Return Value

Type: System.Object

An object that represents the converted value.

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.

.NET Framework
Available since 3.0
Return to top
Show: