XamlType.LookupTypeConverter Method ()

.NET Framework (current version)

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 XamlValueConverter<TConverterBase> that has a TypeConverter constraint, which represents type-conversion behavior for values of this XamlType.

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

protected virtual XamlValueConverter<TypeConverter> LookupTypeConverter()

Return Value

Type: System.Xaml.Schema.XamlValueConverter<TypeConverter>

A XamlValueConverter<TConverterBase> with TypeConverter constraint that represents type-conversion behavior for values of this XamlType; otherwise, null.

This method can be invoked by calls to TypeConverter.

The default implementation returns a value based on reading TypeConverterAttribute. The default implementation can also check BaseType for the attribute if no attribute is found on the immediate underlying type. It also includes special logic for default conversion of enumerations, common value types, and generics. If a value is unavailable, it returns null.

Override this method if you want TypeConverter to use different logic.

.NET Framework
Available since 4.0
Return to top