ConvertFrom Method (ITypeDescriptorContext, CultureInfo, Object)
Collapse the table of content
Expand the table of content

ThicknessConverter.ConvertFrom Method (ITypeDescriptorContext, CultureInfo, Object)

 

Attempts to create an instance of Thickness from a specified object.

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

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

Parameters

typeDescriptorContext
Type: System.ComponentModel.ITypeDescriptorContext

The context information for a type.

cultureInfo
Type: System.Globalization.CultureInfo

The CultureInfo of the type being converted.

source
Type: System.Object

The sourceObject being converted.

Return Value

Type: System.Object

An instance of Thickness created from the converted source.

Exception Condition
ArgumentNullException

The source object is a null reference (Nothing in Visual Basic).

ArgumentException

The example object is not a null reference and is not a valid type that can be converted to a Thickness.

.NET Framework
Available since 3.0
Return to top
Show:
© 2016 Microsoft