XamlType.LookupTypeConverter Method

Definition

Returns a XamlValueConverter<TConverterBase> that has a TypeConverter constraint, which represents type-conversion behavior for values of this XamlType.

protected:
 virtual System::Xaml::Schema::XamlValueConverter<System::ComponentModel::TypeConverter ^> ^ LookupTypeConverter();
protected virtual System.Xaml.Schema.XamlValueConverter<System.ComponentModel.TypeConverter> LookupTypeConverter ();
abstract member LookupTypeConverter : unit -> System.Xaml.Schema.XamlValueConverter<System.ComponentModel.TypeConverter>
override this.LookupTypeConverter : unit -> System.Xaml.Schema.XamlValueConverter<System.ComponentModel.TypeConverter>
Protected Overridable Function LookupTypeConverter () As XamlValueConverter(Of TypeConverter)

Returns

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

Remarks

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.

Applies to