
NameReferenceConverter.CanConvertTo Method (ITypeDescriptorContext, Type)
![]() |
---|
The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience. |
Returns a value that indicates whether the converter can convert an object to the specified destination type.
Assembly: System.Xaml (in System.Xaml.dll)
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.Booleantrue 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.
Available since 4.0