NameReferenceConverter::CanConvertTo Method (ITypeDescriptorContext^, Type^)

.NET Framework (current version)
 

Returns a value that indicates whether the converter can convert an object to the specified destination type.

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

public:
virtual bool CanConvertTo(
	ITypeDescriptorContext^ context,
	Type^ destinationType
) override

Parameters

context
Type: System.ComponentModel::ITypeDescriptorContext^

An ITypeDescriptorContext that provides a format context.

destinationType
Type: System::Type^

The type to convert to.

Return Value

Type: System::Boolean

true if the converter can perform the conversion; otherwise, false.

A destinationType that references the String type returns true; all other destinationType values return false.

This method returns false if context is null, or if IXamlNameProvider cannot be obtained as a service from context.

.NET Framework
Available since 4.0
Return to top
Show: