SectionCollection Class
Represents a collection of sections in the presentation.
public class SectionCollection : IEnumerable<Section>, IEnumerable
Public Class SectionCollection
Implements IEnumerable(Of Section), IEnumerable
- Inheritance:
- SectionCollection
Properties
Count
Gets the number of sections contained in the collection.
Property Value
The number of sections contained in the collection.
Item[Int32]
Gets the section at the specified index.
public Section this[int index] { get; }
Public ReadOnly Property Item(index As Integer) As Section
Parameters
index
- Int32
Property Value
The section at the specified index.
Exceptions
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.
Parameters
name
- String
The name of the section.
Returns
A newly created section.
AddNew(String, Slide)
Adds a new section which starts at a given slide.
public Section AddNew(string name, Slide firstSlide)
Public Function AddNew(name As String, firstSlide As Slide) As Section
Parameters
name
- String
The name of the section.
firstSlide
- Slide
The slide at which the section should start.
Returns
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.
Parameters
item
- Section
The section to locate in the collection.
Returns
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.
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
- Int32
The target position.
Remove(Section, Boolean)
Removes the given section from this collection.
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
- 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.