XamlType.LookupKeyType 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 key property of this XamlType, if the XamlType represents a dictionary.

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

protected virtual XamlType LookupKeyType()

Return Value

Type: System.Xaml.XamlType

A XamlType object for the type of the key for dictionary usage, or null if this XamlType does not represent a dictionary,

This method can be invoked by calls to KeyType.

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

Override this method if you want KeyType to use different logic. Cases where LookupCollectionKind does not return XamlCollectionKind.Dictionary should return null.

.NET Framework
Available since 4.0
Return to top