VisualCollection VisualCollection VisualCollection VisualCollection Class

Definition

Represents a collection of visual instances.

public : sealed class VisualCollection : CompositionObject, IIterable, IVisualCollectionpublic sealed class VisualCollection : CompositionObject, IEnumerable, IVisualCollectionPublic NotInheritable Class VisualCollection Inherits CompositionObject Implements IEnumerable, IVisualCollection// This API is not available in Javascript.
Inheritance
VisualCollectionVisualCollectionVisualCollectionVisualCollection
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Inherited Members

Inherited methods

Inherited properties

Remarks

VisualCollections are ordered from bottom to top and iterating or enumerating through a collection is always done from bottom to top.

Properties

Count Count Count Count

Gets the number of visual instances in the collection.

public : int Count { get; }public int Count { get; }Public ReadOnly Property Count As int// This API is not available in Javascript.
Value
int int int int

The number of visual instances in the collection.

Methods

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

Retrieves an iterator with the first object at the bottom of the collection.

public : IIterator<Visual> First()This member is not implemented in C#This member is not implemented in VB.Net// This API is not available in Javascript.
Returns

Returns an iterator with the first object at the bottom of the collection. VisualCollections are ordered from bottom to top.

GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

Returns an enumerator that iterates through the collection.

This member is not implemented in C++IEnumerator<T> GetEnumerator()Function GetEnumerator As IEnumerator(Of T)IEnumerator<T> GetEnumerator()
Returns

An enumerator that can be used to iterate through the collection.

InsertAbove(Visual, Visual) InsertAbove(Visual, Visual) InsertAbove(Visual, Visual) InsertAbove(Visual, Visual)

Inserts a visual above the specified sibling visual in the visual collection.

public : void InsertAbove(Visual newChild, Visual sibling)public void InsertAbove(Visual newChild, Visual sibling)Public Function InsertAbove(newChild As Visual, sibling As Visual) As void// This API is not available in Javascript.
Parameters
newChild
Visual Visual Visual Visual

The new visual to insert.

sibling
Visual Visual Visual Visual

The sibling to insert the visual above.

Remarks

VisualCollections are ordered from bottom to top and iterating or enumerating through a collection is always done from bottom to top.

InsertAtBottom(Visual) InsertAtBottom(Visual) InsertAtBottom(Visual) InsertAtBottom(Visual)

Inserts a new visual at the bottom of the visual collection.

public : void InsertAtBottom(Visual newChild)public void InsertAtBottom(Visual newChild)Public Function InsertAtBottom(newChild As Visual) As void// This API is not available in Javascript.
Parameters
newChild
Visual Visual Visual Visual

The new visual to insert.

Remarks

VisualCollections are ordered from bottom to top and iterating or enumerating through a collection is always done from bottom to top.

InsertAtTop(Visual) InsertAtTop(Visual) InsertAtTop(Visual) InsertAtTop(Visual)

Inserts a new visual at the top of the visual collection.

public : void InsertAtTop(Visual newChild)public void InsertAtTop(Visual newChild)Public Function InsertAtTop(newChild As Visual) As void// This API is not available in Javascript.
Parameters
newChild
Visual Visual Visual Visual

The new visual to insert.

Remarks

VisualCollections are ordered from bottom to top and iterating or enumerating through a collection is always done from bottom to top.

InsertBelow(Visual, Visual) InsertBelow(Visual, Visual) InsertBelow(Visual, Visual) InsertBelow(Visual, Visual)

Insert a new visual below the specified visual in the visual collection.

public : void InsertBelow(Visual newChild, Visual sibling)public void InsertBelow(Visual newChild, Visual sibling)Public Function InsertBelow(newChild As Visual, sibling As Visual) As void// This API is not available in Javascript.
Parameters
newChild
Visual Visual Visual Visual

The new visual to insert.

sibling
Visual Visual Visual Visual

The sibling visual to insert the new visual below.

Remarks

VisualCollections are ordered from bottom to top and iterating or enumerating through a collection is always done from bottom to top.

Remove(Visual) Remove(Visual) Remove(Visual) Remove(Visual)

Removes the specified visual instance from the collection.

public : void Remove(Visual child)public void Remove(Visual child)Public Function Remove(child As Visual) As void// This API is not available in Javascript.
Parameters
child
Visual Visual Visual Visual

The specified visual instance from the collection.

RemoveAll() RemoveAll() RemoveAll() RemoveAll()

Removes all of the visual instances from the collection.

public : void RemoveAll()public void RemoveAll()Public Function RemoveAll() As void// This API is not available in Javascript.

See Also