NameScope.Remove Method (String)

.NET Framework (current version)
 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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: