UIElementWeakCollection UIElementWeakCollection UIElementWeakCollection UIElementWeakCollection Class

Definition

Represents a collection of weak references to UIElement objects.

public : class UIElementWeakCollection
struct winrt::Windows::UI::Xaml::UIElementWeakCollection
public class UIElementWeakCollection
Public Class UIElementWeakCollection
Attributes

Windows 10 requirements

Device family
Windows 10, version 1903 (introduced v10.0.18362.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v8)

Remarks

This class is used by the ThemeShadow.Receivers property.

Constructors

UIElementWeakCollection() UIElementWeakCollection() UIElementWeakCollection() UIElementWeakCollection()

Initializes a new instance of the UIElementWeakCollection class.

Properties

Size Size Size Size

Gets the size (count) of the collection.

Methods

Append(UIElement) Append(UIElement) Append(UIElement) Append(UIElement)

Adds a new item to the collection.

Clear() Clear() Clear() Clear()

Removes all items from the collection.

First() First() First() First()

Returns an iterator for the items in the collection.

GetAt(UInt32) GetAt(UInt32) GetAt(UInt32) GetAt(UInt32)

Returns the item located at the specified index.

GetMany(UInt32, UIElement[]) GetMany(UInt32, UIElement[]) GetMany(UInt32, UIElement[]) GetMany(UInt32, UIElement[])

Retrieves multiple elements in a single pass through the iterator.

GetView() GetView() GetView() GetView()

Gets an immutable view into the collection.

IndexOf(UIElement, UInt32) IndexOf(UIElement, UInt32) IndexOf(UIElement, UInt32) IndexOf(UIElement, UInt32)

Retrieves the index of the specified item.

InsertAt(UInt32, UIElement) InsertAt(UInt32, UIElement) InsertAt(UInt32, UIElement) InsertAt(UInt32, UIElement)

Inserts the specified item at the specified index.

RemoveAt(UInt32) RemoveAt(UInt32) RemoveAt(UInt32) RemoveAt(UInt32)

Removes the item at the specified index.

RemoveAtEnd() RemoveAtEnd() RemoveAtEnd() RemoveAtEnd()

Removes the last item in the collection.

ReplaceAll(UIElement[]) ReplaceAll(UIElement[]) ReplaceAll(UIElement[]) ReplaceAll(UIElement[])

Initially clears the collection, then inserts the provided array as new items.

SetAt(UInt32, UIElement) SetAt(UInt32, UIElement) SetAt(UInt32, UIElement) SetAt(UInt32, UIElement)

Sets the value at the specified index to the specified UIElement value.

See also