XamlType.LookupValueSerializer Method ()

.NET Framework (current version)

Returns a XamlValueConverter<TConverterBase> that has a ValueSerializer constraint, which represents value serialization behavior for values of this XamlType.

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

protected virtual XamlValueConverter<ValueSerializer> LookupValueSerializer()

Return Value

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

A XamlValueConverter<TConverterBase> with ValueSerializer constraint that represents value serialization behavior for values of this XamlType; otherwise, null.

This method can be invoked by calls to ValueSerializer.

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

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

.NET Framework
Available since 4.0
Return to top