Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

GridLengthConverter.ConvertFrom Method (ITypeDescriptorContext, CultureInfo, Object)

Attempts to convert a specified object to an instance of GridLength.

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

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

Parameters

typeDescriptorContext
Type: System.ComponentModel.ITypeDescriptorContext

Describes the context information of a type.

cultureInfo
Type: System.Globalization.CultureInfo

Cultural specific information that should be respected during conversion.

source
Type: System.Object

The object being converted.

Return Value

Type: System.Object
The instance of GridLength that is created from the converted source.

ExceptionCondition
ArgumentNullException

source object is null.

ArgumentException

source object is not null and is not a valid type that can be converted to a GridLength.

GridLengthConverter supports conversion to and from the following types: String, Decimal, Single, Double, Int16, Int32, Int64, UInt16, UInt32, UInt64.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft