[]
        
(Showing Draft Content)

C1.C1Preview.RenderToc.AddItem

AddItem Method

Creates a new RenderTocItem initialized with the specified text and hyperlink, and adds it to the current TOC.

Declaration
public RenderTocItem AddItem(string text, C1Hyperlink hyperlink)
Parameters
Type Name Description
string text

A text representing the TOC item that is being added.

C1Hyperlink hyperlink

A C1Hyperlink which is the target of the TOC item.

Returns
Type Description
RenderTocItem

The RenderTocItem that was created and added to the current TOC.

Creates a new RenderTocItem initialized with the specified text, hyperlink and level, and adds it to the current TOC.

Declaration
public RenderTocItem AddItem(string text, C1Hyperlink hyperlink, int level)
Parameters
Type Name Description
string text

A text representing the TOC item that is being added.

C1Hyperlink hyperlink

A C1Hyperlink which is the target of the TOC item.

int level

The Level of the TOC item.

Returns
Type Description
RenderTocItem

The RenderTocItem that was created and added to the current TOC.

AddItem(string, int)

Creates a new RenderTocItem initialized with the specified text and target page number, and adds it to the current TOC.

Declaration
public RenderTocItem AddItem(string text, int pageNo)
Parameters
Type Name Description
string text

A text representing the TOC item that is being added.

int pageNo

The page number which is the target of the TOC item.

Returns
Type Description
RenderTocItem

The RenderTocItem that was created and added to the current TOC.

AddItem(string, int, int)

Creates a new RenderTocItem initialized with the specified text, target page number and level, and adds it to the current TOC.

Declaration
public RenderTocItem AddItem(string text, int pageNo, int level)
Parameters
Type Name Description
string text

A text representing the TOC item that is being added.

int pageNo

The page number which is the target of the TOC item.

int level

The Level of the TOC item.

Returns
Type Description
RenderTocItem

The RenderTocItem that was created and added to the current TOC.

AddItem(string, RenderObject)

Creates a new RenderTocItem initialized with the specified text and target RenderObject, and adds it to the current TOC.

Declaration
public RenderTocItem AddItem(string text, RenderObject target)
Parameters
Type Name Description
string text

A text representing the TOC item that is being added.

RenderObject target

A RenderObject which is the target of the TOC item.

Returns
Type Description
RenderTocItem

The RenderTocItem that was created and added to the current TOC.

AddItem(string, RenderObject, int)

Creates a new RenderTocItem initialized with the specified text, target RenderObject and level, and adds it to the current TOC.

Declaration
public RenderTocItem AddItem(string text, RenderObject target, int level)
Parameters
Type Name Description
string text

A text representing the TOC item that is being added.

RenderObject target

A RenderObject which is the target of the TOC item.

int level

The Level of the TOC item.

Returns
Type Description
RenderTocItem

The RenderTocItem that was created and added to the current TOC.

AddItem(string, ParagraphObject)

Creates a new RenderTocItem initialized with the specified text and target ParagraphObject, and adds it to the current TOC.

Declaration
public RenderTocItem AddItem(string text, ParagraphObject target)
Parameters
Type Name Description
string text

A text representing the TOC item that is being added.

ParagraphObject target

A ParagraphObject which is the target of the TOC item.

Returns
Type Description
RenderTocItem

The RenderTocItem that was created and added to the current TOC.

AddItem(string, ParagraphObject, int)

Creates a new RenderTocItem initialized with the specified text, target ParagraphObject and level, and adds it to the current TOC.

Declaration
public RenderTocItem AddItem(string text, ParagraphObject target, int level)
Parameters
Type Name Description
string text

A text representing the TOC item that is being added.

ParagraphObject target

A ParagraphObject which is the target of the TOC item.

int level

The Level of the TOC item.

Returns
Type Description
RenderTocItem

The RenderTocItem that was created and added to the current TOC.