GemBox.Presentation
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    CustomSlideShowCollection Class

    Namespace:
    GemBox.Presentation
    Assembly:
    GemBox.Presentation.dll

    Represents a collection of custom shows that are available within the presentation.

    • C#
    • VB.NET
    public sealed class CustomSlideShowCollection : Collection<CustomSlideShow>, IList, ICollection, IList<CustomSlideShow>, ICollection<CustomSlideShow>, IEnumerable<CustomSlideShow>, IEnumerable
    Public NotInheritable Class CustomSlideShowCollection
        Inherits Collection(Of CustomSlideShow)
        Implements IList, ICollection, IList(Of CustomSlideShow), ICollection(Of CustomSlideShow), IEnumerable(Of CustomSlideShow), IEnumerable
    Inheritance:
    System.Object
    Collection
    Collection<CustomSlideShow>
    CustomSlideShowCollection
    Implements
    System.Collections.IList
    System.Collections.ICollection
    System.Collections.Generic.IList<CustomSlideShow>
    System.Collections.Generic.ICollection<CustomSlideShow>
    System.Collections.Generic.IEnumerable<CustomSlideShow>
    System.Collections.IEnumerable

    Properties

    Count

    Gets the number of CustomSlideShows contained in the collection.

    • C#
    • VB.NET
    public int Count { get; }
    Public ReadOnly Property Count As Integer
    Property Value
    System.Int32

    The number of CustomSlideShows contained in the collection.

    Item[Int32]

    Gets or sets the CustomSlideShow at the specified index.

    • C#
    • VB.NET
    public CustomSlideShow this[int index] { get; set; }
    Public Property Item(index As Integer) As CustomSlideShow
    Parameters
    index
    System.Int32

    The zero-based index of the CustomSlideShow to get or set.

    Property Value
    CustomSlideShow

    The CustomSlideShow at the specified index.

    Exceptions
    System.ArgumentOutOfRangeException

    index is less than zero or index is equal to or greater than Count.

    System.ArgumentNullException

    value is null.

    System.ArgumentException

    value is already contained in another CustomSlideShowCollection or its name is null or System.String.Empty or CustomSlideShow with the same name already exists in the CustomSlideShowCollection.

    Item[String]

    Gets the CustomSlideShow with the specified name or null if the custom show with the specified name does not exist in the collection.

    • C#
    • VB.NET
    public CustomSlideShow this[string name] { get; }
    Public ReadOnly Property Item(name As String) As CustomSlideShow
    Parameters
    name
    System.String

    Name of the custom show.

    Property Value
    CustomSlideShow

    The CustomSlideShow with the specified name.

    Methods

    Add(CustomSlideShow)

    Adds a CustomSlideShow to the end of the collection.

    • C#
    • VB.NET
    public void Add(CustomSlideShow item)
    Public Sub Add(item As CustomSlideShow)
    Parameters
    item
    CustomSlideShow

    The CustomSlideShow to be added to the end of the collection.

    Exceptions
    System.ArgumentNullException

    item is null.

    System.ArgumentException

    item is already contained in another CustomSlideShowCollection or its name is null or System.String.Empty or CustomSlideShow with the same name already exists in the CustomSlideShowCollection.

    AddNew(String)

    Adds a new custom show with the specified name.

    • C#
    • VB.NET
    public CustomSlideShow AddNew(string name)
    Public Function AddNew(name As String) As CustomSlideShow
    Parameters
    name
    System.String

    The name of the custom show.

    Returns
    CustomSlideShow

    A newly added custom show with the specified name.

    Exceptions
    System.ArgumentException

    name is either null or System.String.Empty or custom show with the same name already exists in the collection.

    Clear()

    Removes all CustomSlideShows from the collection.

    • C#
    • VB.NET
    public void Clear()
    Public Sub Clear

    Contains(CustomSlideShow)

    Determines whether a CustomSlideShow is in the collection.

    • C#
    • VB.NET
    public bool Contains(CustomSlideShow item)
    Public Function Contains(item As CustomSlideShow) As Boolean
    Parameters
    item
    CustomSlideShow

    The CustomSlideShow to locate in the collection.

    Returns
    System.Boolean

    true if item is found in the collection; otherwise, false.

    Exceptions
    System.ArgumentNullException

    item is null.

    GetEnumerator()

    Returns an enumerator that iterates through the CustomSlideShowCollection.

    • C#
    • VB.NET
    public IEnumerator<CustomSlideShow> GetEnumerator()
    Public Function GetEnumerator As IEnumerator(Of CustomSlideShow)
    Returns
    System.Collections.Generic.IEnumerator<CustomSlideShow>

    An System.Collections.Generic.IEnumerator<T> for the collection.

    IndexOf(CustomSlideShow)

    Searches for the specified CustomSlideShow and returns the zero-based index of the first occurrence within the entire collection.

    • C#
    • VB.NET
    public int IndexOf(CustomSlideShow item)
    Public Function IndexOf(item As CustomSlideShow) As Integer
    Parameters
    item
    CustomSlideShow

    The CustomSlideShow to locate in the collection.

    Returns
    System.Int32

    The zero-based index of the first occurrence of item within the entire collection, if found; otherwise, -1.

    Insert(Int32, CustomSlideShow)

    Inserts a CustomSlideShow to the collection at the specified index.

    • C#
    • VB.NET
    public void Insert(int index, CustomSlideShow item)
    Public Sub Insert(index As Integer, item As CustomSlideShow)
    Parameters
    index
    System.Int32

    The zero-based index at which CustomSlideShow should be inserted.

    item
    CustomSlideShow

    The CustomSlideShow to insert into the collection.

    Exceptions
    System.ArgumentOutOfRangeException

    index is less than zero or index is equal to or greater than Count.

    System.ArgumentNullException

    item is null.

    System.ArgumentException

    item is already contained in another CustomSlideShowCollection or its name is null or System.String.Empty or CustomSlideShow with the same name already exists in the CustomSlideShowCollection.

    InsertNew(Int32, String)

    Inserts a new custom show with the specified name at the specified index.

    • C#
    • VB.NET
    public CustomSlideShow InsertNew(int index, string name)
    Public Function InsertNew(index As Integer, name As String) As CustomSlideShow
    Parameters
    index
    System.Int32

    The position in the collection where the new custom show should be inserted.

    name
    System.String

    The name of the custom show.

    Returns
    CustomSlideShow

    A newly inserted custom show with the specified name.

    Exceptions
    System.ArgumentOutOfRangeException

    index is less than 0 or greater than Count.

    System.ArgumentException

    name is either null or System.String.Empty or custom show with the same name already exists in the collection.

    Remove(CustomSlideShow)

    Removes the first occurrence of a specific CustomSlideShow from the collection.

    • C#
    • VB.NET
    public bool Remove(CustomSlideShow item)
    Public Function Remove(item As CustomSlideShow) As Boolean
    Parameters
    item
    CustomSlideShow

    The CustomSlideShow to remove from the collection.

    Returns
    System.Boolean

    true if item is successfully removed; otherwise, false. This method also returns false if item was not found in the original collection.

    RemoveAt(Int32)

    Removes the CustomSlideShow at the specified index of the collection.

    • C#
    • VB.NET
    public void RemoveAt(int index)
    Public Sub RemoveAt(index As Integer)
    Parameters
    index
    System.Int32

    The zero-based index of the CustomSlideShow to remove.

    Exceptions
    System.ArgumentOutOfRangeException

    index is less than zero or index is equal to or greater than Count.

    Implements

    System.Collections.IList
    System.Collections.ICollection
    System.Collections.Generic.IList<T>
    System.Collections.Generic.ICollection<T>
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable

    Examples

    Slide Show Example

    See Also

    CustomShows
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.