BrushCollection
BrushCollection
BrushCollection
BrushCollection
Class
Definition
public : sealed class BrushCollection : IIterable, IVectorpublic sealed class BrushCollection : IEnumerable, IListPublic NotInheritable Class BrushCollection Implements IEnumerable, IList// This API is not available in Javascript.
- Attributes
| Device family |
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v3)
|
Remarks
Enumerating the collection in C# or Microsoft Visual Basic
A BrushCollection is enumerable, so you can use language-specific syntax such as foreach in C# to enumerate the items in the collection. The compiler does the type-casting for you and you won't need to cast to IEnumerable<Brush> explicitly. If you do need to cast explicitly, for example if you want to call GetEnumerator, cast to IEnumerable
Constructors
BrushCollection() BrushCollection() BrushCollection() BrushCollection()
Initializes a new instance of the BrushCollection class.
public : BrushCollection()public BrushCollection()Public Sub New()// This API is not available in Javascript.
Properties
Item[Int32] Item[Int32] Item[Int32] Item[Int32]
Gets or sets the element at the specified index.
This member is not implemented in C++T this[int index] { get; set; }Property Item(index As Integer) As TT this[int index] { get; set; }
- index
The zero-based index of the element to get or set.
- Value
- T T T T
The element at the specified index.
index is not a valid index in the System.Collections.Generic.IList`1.
The property is set and the System.Collections.Generic.IList`1 is read-only.
Methods
Clear() Clear() Clear() Clear()
Removes all items from the collection.
public : void Clear()This member is not implemented in C#This member is not implemented in VB.Net// This API is not available in Javascript.
First() First() First() First()
Returns an iterator for the items in the collection.
public : IIterator<Brush> First()This member is not implemented in C#This member is not implemented in VB.Net// This API is not available in Javascript.
The iterator. The iterator's current position is the 0-index position, or at the collection end if the collection is empty.
GetAt(UInt32) GetAt(UInt32) GetAt(UInt32) GetAt(UInt32)
Returns the item located at the specified index.
public : Brush GetAt(unsigned int index)This member is not implemented in C#This member is not implemented in VB.Net// This API is not available in Javascript.
- index
- unsigned int UInt32 UInt32 UInt32
The integer index for the value to retrieve.
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()
An enumerator that can be used to iterate through the collection.
GetMany(UInt32, Brush[]) GetMany(UInt32, Brush[]) GetMany(UInt32, Brush[]) GetMany(UInt32, Brush[])
Retrieves multiple elements in a single pass through the iterator.
public : unsigned int GetMany(unsigned int startIndex, Brush[] items)This member is not implemented in C#This member is not implemented in VB.Net// This API is not available in Javascript.
- startIndex
- unsigned int UInt32 UInt32 UInt32
The index from which to start retrieval.
- items
- Brush[] Brush[] Brush[] Brush[]
Provides the destination for the result. Size the initial array size as a "capacity" in order to specify how many results should be retrieved.
The number of items retrieved.
Remarks
The GetMany method operates identically as if calling and for each element in the supplied array. This means that the first element returned by the GetMany method is the same element as returned by retrieving the property prior to calling GetMany. After the GetMany call returns, the property will retrieve the element following the last element returned by the GetMany call, or produce an error if no more elements exist in the sequences.
The GetMany method returns the actual number of elements returned. It must be the minimum of a) the number of elements remaining in the collection, or b) the number of elements requested, that is "capacity". Therefore, whenever GetMany returns fewer than the number of elements requested, the end of the sequence has been reached. It returns the number of elements retrieved in the "actual" output parameter.
When the caller specifies a capacity of zero, the position of the iterator is unchanged. Elements in the array following the values returned are unchanged.
GetView() GetView() GetView() GetView()
Gets an immutable view into the collection.
public : IVectorView<Brush> GetView()This member is not implemented in C#This member is not implemented in VB.Net// This API is not available in Javascript.
An object representing the immutable collection view.
IndexOf(T) IndexOf(T) IndexOf(T) IndexOf(T)
Determines the index of a specific item in the System.Collections.Generic.IList`1.
This member is not implemented in C++int IndexOf(T item)Function IndexOf(item As T) As Integerint IndexOf(T item)
- item
- T T T T
The object to locate in the System.Collections.Generic.IList`1.
The index of item if found in the list; otherwise, -1.
IndexOf(Brush, UInt32) IndexOf(Brush, UInt32) IndexOf(Brush, UInt32) IndexOf(Brush, UInt32)
Retrieves the index of the specified item.
public : PlatForm::Boolean IndexOf(Brush value, unsigned int index)This member is not implemented in C#This member is not implemented in VB.Net// This API is not available in Javascript.
- index
- unsigned int UInt32 UInt32 UInt32
The index of the item to find, if found.
true if an item with the specified value was found; otherwise, false.
Insert(Int32, T) Insert(Int32, T) Insert(Int32, T) Insert(Int32, T)
Inserts an item to the System.Collections.Generic.IList`1 at the specified index.
This member is not implemented in C++void Insert(int index, T item)Sub Insert(index As Integer, item As T)void Insert(int index, T item)
- index
The zero-based index at which item should be inserted.
- item
- T T T T
The object to insert into the System.Collections.Generic.IList`1.
index is not a valid index in the System.Collections.Generic.IList`1.
The System.Collections.Generic.IList`1 is read-only.
InsertAt(UInt32, Brush) InsertAt(UInt32, Brush) InsertAt(UInt32, Brush) InsertAt(UInt32, Brush)
Inserts the specified item at the specified index.
public : void InsertAt(unsigned int index, Brush value)This member is not implemented in C#This member is not implemented in VB.Net// This API is not available in Javascript.
- index
- unsigned int UInt32 UInt32 UInt32
The index at which to set the value.
Remarks
InsertAt expands the collection and moves all subsequent index items by one.
In contrast, SetAt replaces the item at the index, and the collection count remains the same.
RemoveAt(Int32) RemoveAt(Int32) RemoveAt(Int32) RemoveAt(Int32)
Removes the System.Collections.Generic.IList`1 item at the specified index.
This member is not implemented in C++void RemoveAt(int index)Sub RemoveAt(index As Integer)void RemoveAt(int index)
- index
The zero-based index of the item to remove.
index is not a valid index in the System.Collections.Generic.IList`1.
The System.Collections.Generic.IList`1 is read-only.
RemoveAt(UInt32) RemoveAt(UInt32) RemoveAt(UInt32) RemoveAt(UInt32)
Removes the item at the specified index.
public : void RemoveAt(unsigned int index)This member is not implemented in C#This member is not implemented in VB.Net// This API is not available in Javascript.
- index
- unsigned int UInt32 UInt32 UInt32
The index position of the item to remove.
Remarks
If successful, calling this method reduces the collection size by one. Items with index values greater than the called index have their index values reduced by one.
RemoveAtEnd() RemoveAtEnd() RemoveAtEnd() RemoveAtEnd()
Removes the last item in the collection.
public : void RemoveAtEnd()This member is not implemented in C#This member is not implemented in VB.Net// This API is not available in Javascript.
Remarks
If successful, calling this method reduces the collection size by one.
ReplaceAll(Brush[]) ReplaceAll(Brush[]) ReplaceAll(Brush[]) ReplaceAll(Brush[])
Initially clears the collection, then inserts the provided array as new items.
public : void ReplaceAll(Brush[] items)This member is not implemented in C#This member is not implemented in VB.Net// This API is not available in Javascript.
- items
- Brush[] Brush[] Brush[] Brush[]
The new collection items.
Remarks
For implementations that track a "changed" event, the initial reset fires an event, but the items added do not fire discrete events.
SetAt(UInt32, Brush) SetAt(UInt32, Brush) SetAt(UInt32, Brush) SetAt(UInt32, Brush)
Sets the value at the specified index to the Brush value specified.
public : void SetAt(unsigned int index, Brush value)This member is not implemented in C#This member is not implemented in VB.Net// This API is not available in Javascript.
- index
- unsigned int UInt32 UInt32 UInt32
The index at which to set the value.
Remarks
InsertAt expands the collection and moves all subsequent index items by one.
In contrast, SetAt replaces the item at the index, and the collection count remains the same.