Modifica

Condividi tramite


GridLengthConverter.ConvertFrom Method

Definition

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

public:
 override System::Object ^ ConvertFrom(System::ComponentModel::ITypeDescriptorContext ^ typeDescriptorContext, System::Globalization::CultureInfo ^ cultureInfo, System::Object ^ source);
public override object ConvertFrom (System.ComponentModel.ITypeDescriptorContext typeDescriptorContext, System.Globalization.CultureInfo cultureInfo, object source);
override this.ConvertFrom : System.ComponentModel.ITypeDescriptorContext * System.Globalization.CultureInfo * obj -> obj
Public Overrides Function ConvertFrom (typeDescriptorContext As ITypeDescriptorContext, cultureInfo As CultureInfo, source As Object) As Object

Parameters

typeDescriptorContext
ITypeDescriptorContext

Describes the context information of a type.

cultureInfo
CultureInfo

Cultural specific information that should be respected during conversion.

source
Object

The object being converted.

Returns

The instance of GridLength that is created from the converted source.

Exceptions

source object is null.

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

Remarks

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

Applies to

See also