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

    Show / Hide Table of Contents

    SectionCollection Class

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

    Represents a collection of sections in the presentation.

    • C#
    • VB.NET
    public class SectionCollection : IEnumerable<Section>, IEnumerable
    Public Class SectionCollection
        Implements IEnumerable(Of Section), IEnumerable
    Inheritance:
    System.Object
    SectionCollection
    Implements
    System.Collections.Generic.IEnumerable<Section>
    System.Collections.IEnumerable

    Properties

    Count

    Gets the number of sections contained in the collection.

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

    The number of sections contained in the collection.

    Item[Int32]

    Gets the section at the specified index.

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

    The section at the specified index.

    Exceptions
    System.ArgumentOutOfRangeException

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

    Methods

    AddNew(String)

    Adds an empty section to the end of the collection.

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

    The name of the section.

    Returns
    Section

    A newly created section.

    AddNew(String, Slide)

    Adds a new section which starts at a given slide.

    • C#
    • VB.NET
    public Section AddNew(string name, Slide firstSlide)
    Public Function AddNew(name As String, firstSlide As Slide) As Section
    Parameters
    name
    System.String

    The name of the section.

    firstSlide
    Slide

    The slide at which the section should start.

    Returns
    Section

    A newly created section.

    IndexOf(Section)

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

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

    The section 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.

    Move(Section, Int32)

    Moves the section and its slides to the specified position.

    • C#
    • VB.NET
    public void Move(Section section, int index)
    Public Sub Move(section As Section, index As Integer)
    Parameters
    section
    Section

    The section which should be moved.

    index
    System.Int32

    The target position.

    Remove(Section, Boolean)

    Removes the given section from this collection.

    • C#
    • VB.NET
    public void Remove(Section section, bool removeSlides)
    Public Sub Remove(section As Section, removeSlides As Boolean)
    Parameters
    section
    Section

    The section which should be removed from the collection.

    removeSlides
    System.Boolean

    true if slides in the given section should also be removed, false if only the section should be removed, the slides will be merged with the previous section.

    Implements

    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.