SetterBaseCollection SetterBaseCollection SetterBaseCollection Class

Represents a collection of objects that inherit from SetterBase.

Syntax

Declaration

public sealed class SetterBaseCollectionpublic sealed class SetterBaseCollectionPublic NotInheritable Class SetterBaseCollection
<Style ...>
  oneOrMoreSetters
</Style>

Remarks

Enumerating the collection in C# or Microsoft Visual Basic

A SetterBaseCollection 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<SetterBase> explicitly. If you do need to cast explicitly, for example if you want to call GetEnumerator, cast to IEnumerable<T> with a SetterBase constraint.

Constructors summary

Initializes a new instance of the SetterBaseCollection class.

Properties summary

Gets a value that indicates whether the collection is in a read-only state.

Gets the size (count) of the collection.

Methods summary

Adds a new item to the collection.

Removes all items from the collection.

Returns the iterator for iteration over the items in the collection.

Returns the SetterBase located at the specified index.

Retrieves multiple elements in a single pass through the iterator.

Gets an immutable view into the collection.

Retrieves the index of the specified item.

Inserts the specified item at the specified index.

Removes the item at the specified index.

Removes the last item in the collection.

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

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

Constructors

  • SetterBaseCollection()
    SetterBaseCollection()
    SetterBaseCollection()
    SetterBaseCollection()

    Initializes a new instance of the SetterBaseCollection class.

    public SetterBaseCollection()public New()Public Sub New()public SetterBaseCollection()

Properties

  • IsSealed
    IsSealed
    IsSealed
    IsSealed

    Gets a value that indicates whether the collection is in a read-only state.

    public bool IsSealed { get; }public bool IsSealed { get; }Public ReadOnly Property IsSealed As boolpublic bool IsSealed { get; }

    Property Value

    • bool
      bool
      bool

      true if this object is in a read-only state and cannot be changed; otherwise, false.

  • Size
    Size
    Size
    Size

    Gets the size (count) of the collection.

    public uint Size { get; }public uint Size { get; }Public ReadOnly Property Size As uintpublic uint Size { get; }

    Property Value

    • uint
      uint
      uint

      The count of items in the collection.

    Remarks

    Note

    The equivalent Microsoft .NET API is Count.

Methods

  • Append(SetterBase)
    Append(SetterBase)
    Append(SetterBase)
    Append(SetterBase)

    Adds a new item to the collection.

    public void Append(SetterBase value)public void Append(SetterBase value)Public Function Append(value As SetterBase) As voidpublic void Append(SetterBase value)

    Parameters

    Remarks

    Note

    The equivalent Microsoft .NET API is Add.

  • Clear()
    Clear()
    Clear()
    Clear()

    Removes all items from the collection.

    public void Clear()public void Clear()Public Function Clear() As voidpublic void Clear()
  • First()
    First()
    First()
    First()

    Returns the iterator for iteration over the items in the collection.

    public IIterator<SetterBase> First()public IIterator<SetterBase> First()Public Function First() As IIterator( Of SetterBase )public IIterator<SetterBase> First()

    Returns

    • The iterator object. The iterator's current position is at the 0-index position, or at the collection end if the collection is empty.

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

    Returns the SetterBase located at the specified index.

    public SetterBase GetAt(UInt32 index)public SetterBase GetAt(UInt32 index)Public Function GetAt(index As UInt32) As SetterBasepublic SetterBase GetAt(UInt32 index)

    Parameters

    • index
      System.UInt32
      System.UInt32
      System.UInt32

      The integer index for the value to retrieve.

    Returns

    Remarks

    Note

    The equivalent Microsoft .NET API is Item (the indexer).

  • GetMany(UInt32, SetterBase[])
    GetMany(UInt32, SetterBase[])
    GetMany(UInt32, SetterBase[])
    GetMany(UInt32, SetterBase[])

    Retrieves multiple elements in a single pass through the iterator.

    public uint GetMany(UInt32 startIndex, SetterBase[] items)public uint GetMany(UInt32 startIndex, SetterBase[] items)Public Function GetMany(startIndex As UInt32, items As SetterBase[]) As uintpublic uint GetMany(UInt32 startIndex, SetterBase[] items)

    Parameters

    • startIndex
      System.UInt32
      System.UInt32
      System.UInt32

      The index from which to start retrieval.

    • items
      Windows.UI.Xaml.SetterBase[]
      Windows.UI.Xaml.SetterBase[]
      Windows.UI.Xaml.SetterBase[]

      Provides the destination for the result. Size the initial array size as a capacity in order to specify how many results should be retrieved.

    Returns

    • uint
      uint
      uint

      The number of items returned.

    Remarks

    Note

    The equivalent Microsoft .NET API is CopyTo.

  • GetView()
    GetView()
    GetView()
    GetView()

    Gets an immutable view into the collection.

    public IVectorView<SetterBase> GetView()public IVectorView<SetterBase> GetView()Public Function GetView() As IVectorView( Of SetterBase )public IVectorView<SetterBase> GetView()

    Returns

    • An object representing the immutable collection view.

  • IndexOf(SetterBase, UInt32)
    IndexOf(SetterBase, UInt32)
    IndexOf(SetterBase, UInt32)
    IndexOf(SetterBase, UInt32)

    Retrieves the index of the specified item.

    public bool IndexOf(SetterBase value, UInt32 index)public bool IndexOf(SetterBase value, UInt32 index)Public Function IndexOf(value As SetterBase, index As UInt32) As boolpublic bool IndexOf(SetterBase value, UInt32 index)

    Parameters

    • value

      The value to find in the collection.

    • index
      System.UInt32
      System.UInt32
      System.UInt32

      The index of the item to find, if found.

    Returns

    • bool
      bool
      bool

      true if an item with the specified value was found; otherwise, false.

    Remarks

    Note

    The equivalent Microsoft .NET API is IndexOf(SetterBase, UInt32).

  • InsertAt(UInt32, SetterBase)
    InsertAt(UInt32, SetterBase)
    InsertAt(UInt32, SetterBase)
    InsertAt(UInt32, SetterBase)

    Inserts the specified item at the specified index.

    public void InsertAt(UInt32 index, SetterBase value)public void InsertAt(UInt32 index, SetterBase value)Public Function InsertAt(index As UInt32, value As SetterBase) As voidpublic void InsertAt(UInt32 index, SetterBase value)

    Parameters

    Remarks

    InsertAt(UInt32, SetterBase) expands the collection and moves all subsequent index items by one. In contrast, SetAt(UInt32, SetterBase) replaces the item at the index, and the collection count remains the same.

    Note

    The equivalent Microsoft .NET API is InsertAt(UInt32, SetterBase).

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

    Removes the item at the specified index.

    public void RemoveAt(UInt32 index)public void RemoveAt(UInt32 index)Public Function RemoveAt(index As UInt32) As voidpublic void RemoveAt(UInt32 index)

    Parameters

    • index
      System.UInt32
      System.UInt32
      System.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.

    Note

    The equivalent Microsoft .NET API is RemoveAt(UInt32).

  • RemoveAtEnd()
    RemoveAtEnd()
    RemoveAtEnd()
    RemoveAtEnd()

    Removes the last item in the collection.

    public void RemoveAtEnd()public void RemoveAtEnd()Public Function RemoveAtEnd() As voidpublic void RemoveAtEnd()

    Remarks

    If successful, calling this method reduces the collection size by one.

  • ReplaceAll(SetterBase[])
    ReplaceAll(SetterBase[])
    ReplaceAll(SetterBase[])
    ReplaceAll(SetterBase[])

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

    public void ReplaceAll(SetterBase[] items)public void ReplaceAll(SetterBase[] items)Public Function ReplaceAll(items As SetterBase[]) As voidpublic void ReplaceAll(SetterBase[] items)

    Parameters

    • items
      Windows.UI.Xaml.SetterBase[]
      Windows.UI.Xaml.SetterBase[]
      Windows.UI.Xaml.SetterBase[]

      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 per-item events.

  • SetAt(UInt32, SetterBase)
    SetAt(UInt32, SetterBase)
    SetAt(UInt32, SetterBase)
    SetAt(UInt32, SetterBase)

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

    public void SetAt(UInt32 index, SetterBase value)public void SetAt(UInt32 index, SetterBase value)Public Function SetAt(index As UInt32, value As SetterBase) As voidpublic void SetAt(UInt32 index, SetterBase value)

    Parameters

    Remarks

    InsertAt(UInt32, SetterBase) expands the collection and moves all subsequent index items by one. In contrast, SetAt(UInt32, SetterBase) replaces the item at the index, and the collection count remains the same.

    Note

    The equivalent Microsoft .NET API is Item (the indexer).

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ActivatableAttribute
Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.ThreadingAttribute
Windows.Foundation.Metadata.WebHostHiddenAttribute

Details

Assembly

Windows.UI.Xaml.dll