Remove Method (Object)
Collapse the table of content
Expand the table of content

ResourceDictionary.Remove Method (Object)

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Removes a specific item from the ResourceDictionary.

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

'Declaration
Public Sub Remove ( _
	key As Object _
)

Parameters

key
Type: System.Object
The string key of the item to remove.

Implements

IDictionary.Remove(Object)

ExceptionCondition
ArgumentNullException

key is Nothing.

ArgumentException

Attempted to use a key that is not a string.

ResourceDictionary supports collection APIs that support two signatures for the type of the key component, one that takes strings and one that takes Object. Most Windows Phone scenarios should use strings as the resource key for resources in a ResourceDictionary. The Object as key signatures exist for compatibility and for interface conformance, but internally the dictionary is implemented such that only strings are accepted as keys.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft