[]
        
(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)
Public Function AddItem(text As String, hyperlink As C1Hyperlink) As RenderTocItem
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)
Public Function AddItem(text As String, hyperlink As C1Hyperlink, level As Integer) As RenderTocItem
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)
Public Function AddItem(text As String, pageNo As Integer) As RenderTocItem
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)
Public Function AddItem(text As String, pageNo As Integer, level As Integer) As RenderTocItem
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)
Public Function AddItem(text As String, target As RenderObject) As RenderTocItem
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)
Public Function AddItem(text As String, target As RenderObject, level As Integer) As RenderTocItem
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)
Public Function AddItem(text As String, target As ParagraphObject) As RenderTocItem
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)
Public Function AddItem(text As String, target As ParagraphObject, level As Integer) As RenderTocItem
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.