DataGridLengthConverter.CanConvertFrom Method (ITypeDescriptorContext, Type)

Microsoft Silverlight will reach end of support after October 2021. Learn more.

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)

Syntax

'Declaration
Public Overrides Function CanConvertFrom ( _
    context As ITypeDescriptorContext, _
    sourceType As Type _
) As Boolean
public override bool CanConvertFrom(
    ITypeDescriptorContext context,
    Type sourceType
)

Parameters

  • sourceType
    Type: System.Type
    The type to convert from.

Return Value

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

Remarks

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

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

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