Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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


Type: System.ComponentModel.ITypeDescriptorContext

An ITypeDescriptorContext that provides a format context.

Type: System.Globalization.CultureInfo

The CultureInfo to use as the current culture.

Type: System.Object

The string to convert.

Return Value

Type: System.Object

An object that represents the converted value.

Exception Condition

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
© 2017 Microsoft