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.
Inherited Members
Namespace: VersOne.Epub
Assembly: VersOne.Epub.dll
Syntax
public class EpubNavigationItem
Constructors
View SourceEpubNavigationItem(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 |
EpubLocalTextContentFile | htmlContentFile | The EPUB content file referenced by the navigation element or |
List<EpubNavigationItem> | nestedItems | A list of child navigation elements constituting the nested navigational hierarchy within the navigation element. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The |
Properties
View SourceHtmlContentFile
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 SourceLink
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 SourceNestedItems
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 SourceTitle
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 SourceType
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 SourceToString()
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. |