ResourceDictionary.Add Method (String, Object)
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Adds an item to the ResourceDictionary.
Assembly: System.Windows (in System.Windows.dll)
Parameters
- key
- Type: System.String
The string key of the item to add.
- value
- Type: System.Object
The item value to add.
| Exception | Condition |
|---|---|
| NotSupportedException | Attempted to add Nothing as a value. |
| ArgumentException | Attempted to add an item with a key that already exists in this ResourceDictionary. |
All key values provided for a ResourceDictionary must be unique within that ResourceDictionary.
Show: