ResourceDictionary.Item Property
Silverlight
Gets the element at the specified index.
Namespace: System.Windows
Assembly: System.Windows (in System.Windows.dll)
| Exception | Condition |
|---|---|
| NotImplementedException |
Attempted to set a value using the indexer. |
| ArgumentNullException |
key is null. |
| ArgumentException |
key is not a string. |
The main scenario for using the ResourceDictionary is to retrieve resources from a specific Silverlight ResourceDictionary at run time. For more information, see Referencing Resources from Code.
This indexer implementation specifically blocks a "set" usage. If you attempt to set a value using the indexer, an exception is thrown. You must remove and re-add to the ResourceDictionary in order to change a key-value pair.
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.