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

NullableBoolConverter.CanConvertFrom Method (ITypeDescriptorContext, Type)

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Determines whether this converter can convert an object of the specified type to the Nullable<T> type (using the Boolean type constraint on the generic).

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

public override bool CanConvertFrom(
	ITypeDescriptorContext context,
	Type sourceType


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

Return Value

Type: System.Boolean
true if sourceType is a String, Boolean, or a Nullable<T> type (using the Boolean type constraint on the generic) that can be assigned from sourceType; otherwise, false.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

© 2017 Microsoft