UIElementWeakCollection Classe

Définition

Représente une collection de références faibles aux objets UIElement.

/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 524288)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class UIElementWeakCollection : IIterable<UIElement>, IVector<UIElement>
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 524288)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public class UIElementWeakCollection : IEnumerable<UIElement>, IList<UIElement>
Public Class UIElementWeakCollection
Implements IEnumerable(Of UIElement), IList(Of UIElement)
Héritage
Object IInspectable UIElementWeakCollection
Attributs
Implémente

Configuration requise pour Windows

Famille d’appareils
Windows 10, version 1903 (introduit dans 10.0.18362.0)
API contract
Windows.Foundation.UniversalApiContract (introduit dans v8.0)

Remarques

Cette classe est utilisée par la propriété ThemeShadow.Receivers .

Constructeurs

UIElementWeakCollection()

Initialise une nouvelle instance de la classe UIElementWeakCollection.

Propriétés

Size

Obtient la taille (nombre) de la collection.

Méthodes

Append(UIElement)

Ajoute un nouvel élément à la collection.

Clear()

Supprime tous les éléments de la collection.

First()

Retourne un itérateur pour les éléments de la collection.

GetAt(UInt32)

Retourne l’élément situé à l’index spécifié.

GetMany(UInt32, UIElement[])

Récupère plusieurs éléments en un seul passage par l’itérateur.

GetView()

Obtient une vue immuable dans la collection.

IndexOf(UIElement, UInt32)

Récupère l’index de l’élément spécifié.

InsertAt(UInt32, UIElement)

Insère l’élément spécifié à l’index spécifié.

RemoveAt(UInt32)

Supprime l'élément à l'index spécifié.

RemoveAtEnd()

Supprime le dernier élément de la collection.

ReplaceAll(UIElement[])

Efface initialement la collection, puis insère le tableau fourni en tant que nouveaux éléments.

SetAt(UInt32, UIElement)

Définit la valeur à l’index spécifié sur la valeur UIElement spécifiée.

S’applique à

Voir aussi