TriggerCollection TriggerCollection TriggerCollection Class

Represents a collection of EventTrigger objects.

Syntax

Declaration

public sealed class TriggerCollectionpublic sealed class TriggerCollectionPublic NotInheritable Class TriggerCollection
<object>
  <object.Triggers>
    oneOrMoreEventTriggers
  </object.Triggers>
</object>

Remarks

Enumerating the collection in C# or Microsoft Visual Basic

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

Properties summary

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 item 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 TriggerBase value specified.

Properties

  • Size
    Size
    Size
    Size

    Gets the size (count) of the collection.

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

    Property Value

    • uint
      uint
      uint

      The count of items in the collection.

    Remarks

    Note

    The equivalent Microsoft .NET API is Count.

Methods

  • Append(Windows.UI.Xaml.TriggerBase)
    Append(Windows.UI.Xaml.TriggerBase)
    Append(Windows.UI.Xaml.TriggerBase)
    Append(Windows.UI.Xaml.TriggerBase)

    Adds a new item to the collection.

    public void Append(Windows.UI.Xaml.TriggerBase value)public void Append(Windows.UI.Xaml.TriggerBase value)Public Function Append(value As Windows.UI.Xaml.TriggerBase) As void

    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 void
  • First()
    First()
    First()
    First()

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

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

    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(System.UInt32)
    GetAt(System.UInt32)
    GetAt(System.UInt32)
    GetAt(System.UInt32)

    Returns the item located at the specified index.

    public TriggerBase GetAt(System.UInt32 index)public TriggerBase GetAt(System.UInt32 index)Public Function GetAt(index As System.UInt32) As TriggerBase

    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(System.UInt32,Windows.UI.Xaml.TriggerBase[])
    GetMany(System.UInt32,Windows.UI.Xaml.TriggerBase[])
    GetMany(System.UInt32,Windows.UI.Xaml.TriggerBase[])
    GetMany(System.UInt32,Windows.UI.Xaml.TriggerBase[])

    Retrieves multiple elements in a single pass through the iterator.

    public uint GetMany(System.UInt32 startIndex,Windows.UI.Xaml.TriggerBase[] items)public uint GetMany(System.UInt32 startIndex,Windows.UI.Xaml.TriggerBase[] items)Public Function GetMany(startIndex As System.UInt32,items As Windows.UI.Xaml.TriggerBase[]) As uint

    Parameters

    • startIndex
      System.UInt32
      System.UInt32
      System.UInt32

      The index from which to start retrieval.

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

      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 retrieved.

    Remarks

    Note

    The equivalent Microsoft .NET API is CopyTo.

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

    Gets an immutable view into the collection.

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

    Returns

    • An object representing the immutable collection view.

  • IndexOf(Windows.UI.Xaml.TriggerBase,System.UInt32)
    IndexOf(Windows.UI.Xaml.TriggerBase,System.UInt32)
    IndexOf(Windows.UI.Xaml.TriggerBase,System.UInt32)
    IndexOf(Windows.UI.Xaml.TriggerBase,System.UInt32)

    Retrieves the index of the specified item.

    public bool IndexOf(Windows.UI.Xaml.TriggerBase value,System.UInt32 index)public bool IndexOf(Windows.UI.Xaml.TriggerBase value,System.UInt32 index)Public Function IndexOf(value As Windows.UI.Xaml.TriggerBase,index As System.UInt32) As bool

    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(Windows.UI.Xaml.TriggerBase,System.UInt32).

  • InsertAt(System.UInt32,Windows.UI.Xaml.TriggerBase)
    InsertAt(System.UInt32,Windows.UI.Xaml.TriggerBase)
    InsertAt(System.UInt32,Windows.UI.Xaml.TriggerBase)
    InsertAt(System.UInt32,Windows.UI.Xaml.TriggerBase)

    Inserts the specified item at the specified index.

    public void InsertAt(System.UInt32 index,Windows.UI.Xaml.TriggerBase value)public void InsertAt(System.UInt32 index,Windows.UI.Xaml.TriggerBase value)Public Function InsertAt(index As System.UInt32,value As Windows.UI.Xaml.TriggerBase) As void

    Parameters

    Remarks

    Note

    The equivalent Microsoft .NET API is InsertAt(System.UInt32,Windows.UI.Xaml.TriggerBase).

  • RemoveAt(System.UInt32)
    RemoveAt(System.UInt32)
    RemoveAt(System.UInt32)
    RemoveAt(System.UInt32)

    Removes the item at the specified index.

    public void RemoveAt(System.UInt32 index)public void RemoveAt(System.UInt32 index)Public Function RemoveAt(index As System.UInt32) As void

    Parameters

    • index
      System.UInt32
      System.UInt32
      System.UInt32

      The index position of the item to remove.

    Remarks

    Note

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

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

    Removes the last item in the collection.

    public void RemoveAtEnd()public void RemoveAtEnd()Public Function RemoveAtEnd() As void
  • ReplaceAll(Windows.UI.Xaml.TriggerBase[])
    ReplaceAll(Windows.UI.Xaml.TriggerBase[])
    ReplaceAll(Windows.UI.Xaml.TriggerBase[])
    ReplaceAll(Windows.UI.Xaml.TriggerBase[])

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

    public void ReplaceAll(Windows.UI.Xaml.TriggerBase[] items)public void ReplaceAll(Windows.UI.Xaml.TriggerBase[] items)Public Function ReplaceAll(items As Windows.UI.Xaml.TriggerBase[]) As void

    Parameters

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

      The new collection items.

  • SetAt(System.UInt32,Windows.UI.Xaml.TriggerBase)
    SetAt(System.UInt32,Windows.UI.Xaml.TriggerBase)
    SetAt(System.UInt32,Windows.UI.Xaml.TriggerBase)
    SetAt(System.UInt32,Windows.UI.Xaml.TriggerBase)

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

    public void SetAt(System.UInt32 index,Windows.UI.Xaml.TriggerBase value)public void SetAt(System.UInt32 index,Windows.UI.Xaml.TriggerBase value)Public Function SetAt(index As System.UInt32,value As Windows.UI.Xaml.TriggerBase) As void

    Parameters

    Remarks

    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.ContractVersionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.WebHostHiddenAttribute
Windows.Foundation.Metadata.ThreadingAttribute

Details

Assembly

Windows.UI.Xaml.dll