OutlineItemCollection
Overview
OutlineItemCollection is a class in Aspose.PDF FOSS for .NET.
Inherits from: OutlineItem, System.Collections.Generic.IEnumerable<OutlineItemCollection>.
A single outline item that may have child items (bookmarks/TOC entries).
This class provides 13 methods for working with OutlineItemCollection objects in .NET programs.
Available methods include: Add, Clear, Contains, CopyTo, Delete, GetEnumerator, Insert, OutlineItem, OutlineItemCollection, Remove.
All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package.
Properties: Action, Bold, Children, Color, Count, Destination, and 18 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
Count | int | Read | Number of child outline items. |
First | OutlineItemCollection? | Read | The first child outline item, or null if none. |
Last | OutlineItemCollection? | Read | The last child outline item, or null if none. |
Next | OutlineItemCollection? | Read | The next sibling outline item, or null if this is the last sibling. |
Prev | OutlineItemCollection? | Read | The previous sibling outline item, or null if this is the first sibling. |
HasNext | bool | Read | True when this item has a next sibling. |
Title | string | Read/Write | The bookmark title. |
Action | Aspose.Pdf.Annotations.PdfAction? | Read/Write | The action associated with this outline item, if any. |
Destination | Aspose.Pdf.Annotations.IAppointment? | Read/Write | The destination of this outline item. |
Bold | bool | Read/Write | Whether the bookmark is rendered in bold. |
Italic | bool | Read/Write | Whether the bookmark is rendered in italic. |
Color | System.Drawing.Color | Read/Write | Bookmark colour. |
Open | bool | Read/Write | Whether the bookmark is expanded. |
IsReadOnly | bool | Read | Whether the collection is read-only. |
IsSynchronized | bool | Read | Whether the collection is thread-safe. |
SyncRoot | object | Read | Synchronization root for IsSynchronized; returns this collection. |
Level | int | Read | Depth of this bookmark in the outline tree (top-level = 0). |
Parent | Outlines? | Read | The owning outline tree, or null when this item is not yet attached. |
VisibleCount | int | Read | Number of bookmarks that are visible (counts /Count entries recursively). |
IsOpen | bool | Read/Write | Whether this outline item is initially open (expanded). |
IsBold | bool | Read/Write | Whether the outline item title is displayed in bold. |
IsItalic | bool | Read/Write | Whether the outline item title is displayed in italic. |
DestinationPageNumber | int | Read | The destination page number (1-based), or 0 if not set or not a page destination. |
Children | IReadOnlyList<OutlineItem> | Read | Child outline items. |
Methods
| Signature | Description |
|---|---|
OutlineItemCollection() | Construct an empty outline item. |
OutlineItemCollection(outlines: OutlineCollection?) | Construct an outline item bound to an existing outline collection (mirrors new OutlineItemCollection(doc.Outlines)). |
GetEnumerator() | Iterates over child outline items. |
Add(outline: OutlineItemCollection) | Add an outline item as a child of this one. |
Clear() | Remove every child outline item. |
Contains(item: OutlineItemCollection) | Whether the supplied item is a direct child of this one. |
CopyTo(array: OutlineItemCollection[], index: int) | Copy children into array starting at index. |
Delete() | Remove every child outline item (alias for Clear). |
Delete(name: string) | Remove the first child whose title matches name. |
Insert(index: int, outline: OutlineItemCollection) | Insert an outline item at the supplied 1-based index. |
Remove(item: OutlineItemCollection) | Remove the supplied child and report whether it was present. |
Remove(index: int) | Remove the child at the supplied 1-based index. |
OutlineItem() | Create a new outline item that can be added to an OutlineCollection or another OutlineItem. |