XamlType.LookupItemType 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 value that provides the type information for the Items property of this XamlType.

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

protected virtual XamlType LookupItemType()

Return Value

Type: System.Xaml.XamlType

A XamlType object for the type of the items in the collection; otherwise, null if this XamlType does not represent a collection.

This method can be invoked by calls to ItemType.

The default implementation can use CLR reflection concepts, such as checking for an Add method by MethodInfo and using the ParameterInfo; checking IsArray; and checking BaseType and trying the same logic there.

Override this method if you want ItemType to use different logic. Cases where LookupCollectionKind returns XamlCollectionKind.None should return null.

.NET Framework
Available since 4.0
Return to top