Export (0) Print
Expand All

XamlType.LookupCollectionKind Method

Returns a value of the XamlCollectionKind enumeration that declares which specific collection type this XamlType uses.

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

protected virtual XamlCollectionKind LookupCollectionKind()

Return Value

Type: System.Xaml.Schema.XamlCollectionKind
A value of the XamlCollectionKind enumeration.

This method is invoked by an internal private method (no public CollectionKind or GetCollectionKind API exists on XamlType).

The default implementation uses the internal CLR reflection. For cases where UnderlyingType is null, the default implementation can use BaseType, if it is available. This behavior indirectly calls LookupCollectionKind recursively to attempt to find a valid base type; it returns XamlCollectionKind.None if no valid base type exists. In general, the default implementation attempts to find the Add method of the underlying type by reflection. If found, the MethodInfo of the Add method is enough information to determine which XamlCollectionKind value should be returned. Otherwise, it returns XamlCollectionKind.None.

Override this method if you are not relying on default internal CLR reflection and are using metadata or other techniques for reporting the XAML type system information or schema information of a type.

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

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

Community Additions

© 2014 Microsoft