Show / Hide Table of Contents

Class EpubNavigationItem

A single navigation element of the book (typically within the table of contents). Depending on the value of the Type property, it can act either as a header or as a navigation link. Unlike EpubNavigationItemRef, this class contains the HtmlContentFile property which (if it's not null) holds the whole content of the file referenced by this navigation element.

Inheritance
object
EpubNavigationItem
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: VersOne.Epub
Assembly: VersOne.Epub.dll
Syntax
public class EpubNavigationItem

Constructors

View Source

EpubNavigationItem(EpubNavigationItemType, string, EpubNavigationItemLink?, EpubLocalTextContentFile?, List<EpubNavigationItem>?)

Initializes a new instance of the EpubNavigationItem class.

Declaration
public EpubNavigationItem(EpubNavigationItemType type, string title, EpubNavigationItemLink? link, EpubLocalTextContentFile? htmlContentFile, List<EpubNavigationItem>? nestedItems)
Parameters
Type Name Description
EpubNavigationItemType type

The value determining whether this navigation item acts as a header or as a navigation link.

string title

The title of the navigation element (which is either the text of the header or the title of the navigation link).

EpubNavigationItemLink link

The link of the navigation element if it acts as a navigation link or null if it acts as a header.

EpubLocalTextContentFile htmlContentFile

The EPUB content file referenced by the navigation element or null if the value of the link parameter is null.

List<EpubNavigationItem> nestedItems

A list of child navigation elements constituting the nested navigational hierarchy within the navigation element.

Exceptions
Type Condition
ArgumentNullException

The title parameter is null.

Properties

View Source

HtmlContentFile

Gets the EPUB content file referenced by the navigation element or null if the value of the Link property is null.

Declaration
public EpubLocalTextContentFile? HtmlContentFile { get; }
Property type: EpubLocalTextContentFile
View Source

Link

Gets the link of the navigation element if it acts as a navigation link or null if it acts as a header.

Declaration
public EpubNavigationItemLink? Link { get; }
Property type: EpubNavigationItemLink
View Source

NestedItems

Gets a list of child navigation elements constituting the nested navigational hierarchy within the navigation element.

Declaration
public List<EpubNavigationItem> NestedItems { get; }
Property type: List<EpubNavigationItem>
View Source

Title

Gets the title of the navigation element (which is either the text of the header or the title of the navigation link).

Declaration
public string Title { get; }
Property type: string
View Source

Type

Gets the value determining whether this navigation item acts as a header or as a navigation link.

Declaration
public EpubNavigationItemType Type { get; }
Property type: EpubNavigationItemType

Methods

View Source

ToString()

Returns a string containing the values of the Type and Title properties and the number of the elements in the NestedItems property for debugging purposes.

Declaration
public override string ToString()
Returns
Type Description
string

A string containing the values of the Type and Title properties and the number of the elements in the NestedItems property.

Overrides
object.ToString()
  • View Source
In this article
Back to top Generated by DocFX