Updated: July 2008
Specifies a property of the associated class implementation that provides the implicit key value, when the class is included as an item in an IDictionary collection.
Assembly: WindowsBase (in WindowsBase.dll)
'Declaration <AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple := False, Inherited := True)> _ Public NotInheritable Class DictionaryKeyPropertyAttribute _ Inherits Attribute 'Usage Dim instance As DictionaryKeyPropertyAttribute
Items in an IDictionary collection (such as the WPF ResourceDictionary) require a key. In XAML the key is normally specified by x:Key in the markup. The is applied to classes that work with an implicit key, where the key to use for the IDictionary comes from a different existing property value. In this way, the class applying the can be included in an IDictionary without an explicit key so long as the property referenced by IDictionary has a value that is valid as a key.
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.