Skip to main content

CanConvertFrom(ITypeDescriptorContext, Type) Method

Returns whether this converter can convert an object of the given type to the type of this converter, using the specified context.

Definition

Namespace: Avalonia.Markup.Xaml.Converters
Assembly: Avalonia.Markup.Xaml (in Avalonia.Markup.Xaml.dll)

public override bool CanConvertFrom(
ITypeDescriptorContext? context,
Type sourceType
)

Parameters

  ITypeDescriptorContext
An ITypeDescriptorContext that provides a format context.
  Type
A Type that represents the type you want to convert from.

Return Value

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

See Also

Reference

FontFamilyTypeConverter Class
CanConvertFrom Overload
Avalonia.Markup.Xaml.Converters Namespace