Windows apps
Collapse the table of content
Expand the table of content
Information
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.

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
)

Parameters

typeDescriptorContext
Type: System.ComponentModel.ITypeDescriptorContext

Provides contextual information about a component.

cultureInfo
Type: System.Globalization.CultureInfo

Represents culture-specific information that is maintained during a conversion.

source
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.

Exception Condition
ArgumentNullException

Occurs if the source is null.

ArgumentException

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
Available since 3.0
Return to top
Show:
© 2016 Microsoft