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.

ThicknessConverter.ConvertFrom Method (ITypeDescriptorContext, CultureInfo, Object)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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:
© 2018 Microsoft