Ανάγνωση στα Αγγλικά Επεξεργασία

Κοινή χρήση μέσω


NameScope.Remove Method

Definition

Removes the specific object from the collection.

Overloads

Remove(KeyValuePair<String,Object>)

Removes the specific object from the collection.

Remove(String)

Removes a mapping for a specified name from the collection.

Remove(KeyValuePair<String,Object>)

Removes the specific object from the collection.

public bool Remove (System.Collections.Generic.KeyValuePair<string,object> item);

Parameters

item
KeyValuePair<String,Object>

The object to remove from the collection, specified as a KeyValuePair<TKey,TValue> (key is String, value is Object).

Returns

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

Implements

Remarks

Because NameScope is a dictionary there is no concept of first occurrence; any given KeyValuePair<TKey,TValue> is guaranteed unique.

Applies to

.NET Framework 4.8.1 και άλλες εκδόσεις
Προϊόν Εκδόσεις
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

Remove(String)

Removes a mapping for a specified name from the collection.

public bool Remove (string key);

Parameters

key
String

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

Returns

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

Implements

Remarks

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

Applies to

.NET Framework 4.8.1 και άλλες εκδόσεις
Προϊόν Εκδόσεις
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9