This documentation is archived and is not being maintained.

LengthConverter.ConvertFrom Method (ITypeDescriptorContext, CultureInfo, Object)

Converts instances of other data types into instances of Double that represent an object's length.

Namespace:  System.Windows
Assembly:  PresentationFramework (in PresentationFramework.dll)

public override Object ConvertFrom(
	ITypeDescriptorContext typeDescriptorContext,
	CultureInfo cultureInfo,
	Object source


Type: System.ComponentModel.ITypeDescriptorContext
Provides contextual information about a component.
Type: System.Globalization.CultureInfo
Represents culture-specific information that is maintained during a conversion.
Type: System.Object
Identifies the object that is being converted to Double.

Return Value

Type: System.Object
An instance of Double that is the value of the conversion.


Occurs if the source is null.


Occurs if the source is not null and is not a valid type for conversion.

LengthConverter supports conversion of the following types: String, Decimal, Single, Double, Int16, Int32, Int64, UInt16, UInt32, UInt64.

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.