Editar

Compartilhar via


TextDecorationCollection.TryRemove Method

Definition

Removes a collection of TextDecorations from the current collection and returns the resultant (new) collection.

public:
 bool TryRemove(System::Collections::Generic::IEnumerable<System::Windows::TextDecoration ^> ^ textDecorations, [Runtime::InteropServices::Out] System::Windows::TextDecorationCollection ^ % result);
public bool TryRemove (System.Collections.Generic.IEnumerable<System.Windows.TextDecoration> textDecorations, out System.Windows.TextDecorationCollection result);
member this.TryRemove : seq<System.Windows.TextDecoration> * TextDecorationCollection -> bool
Public Function TryRemove (textDecorations As IEnumerable(Of TextDecoration), ByRef result As TextDecorationCollection) As Boolean

Parameters

textDecorations
IEnumerable<TextDecoration>

The collection to be removed.

result
TextDecorationCollection

Out parameter containing the result. If no element was removed from the current collection, then result is a new collection identical to the original one.

Returns

true if at least one item was removed from the current collection; otherwise, false.

Remarks

The current collection remains unchanged. If the collection to be removed is not a subset of the current collection, then no element is removed. If the source collection has multiple instances of an item, then all instances of the item are removed.

Applies to