Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

NameScope.Remove Method (String)

.NET Framework (current version)
 

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.

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

.NET Framework
Available since 4.0
Return to top
Show:
© 2017 Microsoft