ResourceDictionary.Keys 属性

定义

获取此 ResourceDictionary 中包含的所有键的集合。Gets a collection of all keys contained in this ResourceDictionary.

public:
 property System::Collections::ICollection ^ Keys { System::Collections::ICollection ^ get(); };
public System.Collections.ICollection Keys { get; }
member this.Keys : System.Collections.ICollection
Public ReadOnly Property Keys As ICollection

属性值

所有键的集合。The collection of all keys.

实现

注解

此属性是必需的,因为它是 IDictionary必需的,但通常 Keys 对于大多数 ResourceDictionary 方案都没有用处。This property exists because it is required by IDictionary, but Keys generally is not useful for most ResourceDictionary scenarios.

返回的密钥不包括 MergedDictionaries中的密钥。The returned keys do not include keys within the MergedDictionaries. 此外,keys 集合是基本字典中的键的快照。Also the keys collection is a snapshot of the keys in the base dictionary. 如果你随后对此 ResourceDictionary进行更改,则存储 Keys 将不会反映这些更改。If you subsequently make changes to this ResourceDictionary, a stored Keys will not reflect the changes.

适用于

另请参阅