CanConvertFrom Method (ITypeDescriptorContext, Type)
Collapse the table of content
Expand the table of content

DataGridLengthConverter.CanConvertFrom Method (ITypeDescriptorContext, Type)

Determines whether conversion is possible from the specified type to a DataGridLength.

Namespace:  System.Windows.Controls
Assembly:  System.Windows.Controls.Data (in System.Windows.Controls.Data.dll)

public override bool CanConvertFrom(
	ITypeDescriptorContext context,
	Type sourceType


Type: System.ComponentModel.ITypeDescriptorContext
An object that provides a format context.
Type: System.Type
The type to convert from.

Return Value

Type: System.Boolean
true if this converter can perform the conversion; otherwise, false.

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


Supported in: 5, 4, 3

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

© 2015 Microsoft