Export (0) Print
Expand All

ValueSerializer.TypeReferences Method

Gets an enumeration of the types referenced by the ValueSerializer.

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

public virtual IEnumerable<Type> TypeReferences(
	Object value,
	IValueSerializerContext context
)

Parameters

value
Type: System.Object

The value being serialized.

context
Type: System.Windows.Markup.IValueSerializerContext

Context information that is used for conversion.

Return Value

Type: System.Collections.Generic.IEnumerable<Type>
The types converted by this serializer.

Any types a ValueSerializer converts should be included in the returned enumeration. This allows a serializer to ensure a de-serializer has enough information about the types this serializer converts.

Overriding this method is an advanced scenario. Overriding should only be necessary if you are implementing a system where CLR type system ownertype-property relationships available to a XAML schema context do not report enough information.

WPF Usage Notes

The WPF property system implements an internal value serializer that overrides TypeReferences because a dependency property has a concept that it can have added owners. WPF expressions also have special internal handling.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft