Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Remove Method (String)
Collapse the table of content
Expand the table of content

NameScope.Remove Method (String)

.NET Framework 4.6 and 4.5

Removes a mapping for a specified name from the collection.

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

public bool Remove(
	string key
)

Parameters

key
Type: System.String

The string key, which is the name of the XAML namescope mapping to remove.

Return Value

Type: System.Boolean
true if item was successfully removed from the collection, otherwise false. Also returns false if the item was not found in the collection.

Implements

IDictionary<TKey, TValue>.Remove(TKey)

This method basically wraps UnregisterName, returning false in cases that otherwise would have raised exceptions in UnregisterName.

.NET Framework

Supported in: 4.6, 4.5, 4

.NET Framework Client Profile

Supported in: 4
Show:
© 2015 Microsoft