# C1.C1Preview.RenderToc.AddItem

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_C1Preview_RenderToc_AddItem_" data-uid="C1.C1Preview.RenderToc.AddItem*">AddItem Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_C1Preview_RenderToc_AddItem_" data-uid="C1.C1Preview.RenderToc.AddItem*"></a>
<h4 id="C1_C1Preview_RenderToc_AddItem_System_String_C1_C1Preview_C1Hyperlink_" data-uid="C1.C1Preview.RenderToc.AddItem(System.String,C1.C1Preview.C1Hyperlink)">AddItem(string, C1Hyperlink)</h4>
<div class="markdown level1 summary"><p>Creates a new <a class="xref" href="C1.C1Preview.RenderTocItem.html">RenderTocItem</a> initialized with the specified
text and hyperlink, and adds it to the current TOC.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public RenderTocItem AddItem(string text, C1Hyperlink hyperlink)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function AddItem(text As String, hyperlink As C1Hyperlink) As RenderTocItem</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">text</span></td>
      <td><p>A text representing the TOC item that is being added.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.C1Preview.C1Hyperlink.html">C1Hyperlink</a></td>
      <td><span class="parametername">hyperlink</span></td>
      <td><p>A <a class="xref" href="C1.C1Preview.C1Hyperlink.html">C1Hyperlink</a> which is the target of the TOC item.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.C1Preview.RenderTocItem.html">RenderTocItem</a></td>
      <td><p>The <a class="xref" href="C1.C1Preview.RenderTocItem.html">RenderTocItem</a> that was created and added to the current TOC.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_C1Preview_RenderToc_AddItem_" data-uid="C1.C1Preview.RenderToc.AddItem*"></a>
<h4 id="C1_C1Preview_RenderToc_AddItem_System_String_C1_C1Preview_C1Hyperlink_System_Int32_" data-uid="C1.C1Preview.RenderToc.AddItem(System.String,C1.C1Preview.C1Hyperlink,System.Int32)">AddItem(string, C1Hyperlink, int)</h4>
<div class="markdown level1 summary"><p>Creates a new <a class="xref" href="C1.C1Preview.RenderTocItem.html">RenderTocItem</a> initialized with the specified
text, hyperlink and level, and adds it to the current TOC.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public RenderTocItem AddItem(string text, C1Hyperlink hyperlink, int level)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function AddItem(text As String, hyperlink As C1Hyperlink, level As Integer) As RenderTocItem</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">text</span></td>
      <td><p>A text representing the TOC item that is being added.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.C1Preview.C1Hyperlink.html">C1Hyperlink</a></td>
      <td><span class="parametername">hyperlink</span></td>
      <td><p>A <a class="xref" href="C1.C1Preview.C1Hyperlink.html">C1Hyperlink</a> which is the target of the TOC item.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">level</span></td>
      <td><p>The <a class="xref" href="C1.C1Preview.RenderTocItem.Level.html#C1_C1Preview_RenderTocItem_Level">Level</a> of the TOC item.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.C1Preview.RenderTocItem.html">RenderTocItem</a></td>
      <td><p>The <a class="xref" href="C1.C1Preview.RenderTocItem.html">RenderTocItem</a> that was created and added to the current TOC.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_C1Preview_RenderToc_AddItem_" data-uid="C1.C1Preview.RenderToc.AddItem*"></a>
<h4 id="C1_C1Preview_RenderToc_AddItem_System_String_System_Int32_" data-uid="C1.C1Preview.RenderToc.AddItem(System.String,System.Int32)">AddItem(string, int)</h4>
<div class="markdown level1 summary"><p>Creates a new <a class="xref" href="C1.C1Preview.RenderTocItem.html">RenderTocItem</a> initialized with the specified
text and target page number, and adds it to the current TOC.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public RenderTocItem AddItem(string text, int pageNo)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function AddItem(text As String, pageNo As Integer) As RenderTocItem</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">text</span></td>
      <td><p>A text representing the TOC item that is being added.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">pageNo</span></td>
      <td><p>The page number which is the target of the TOC item.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.C1Preview.RenderTocItem.html">RenderTocItem</a></td>
      <td><p>The <a class="xref" href="C1.C1Preview.RenderTocItem.html">RenderTocItem</a> that was created and added to the current TOC.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_C1Preview_RenderToc_AddItem_" data-uid="C1.C1Preview.RenderToc.AddItem*"></a>
<h4 id="C1_C1Preview_RenderToc_AddItem_System_String_System_Int32_System_Int32_" data-uid="C1.C1Preview.RenderToc.AddItem(System.String,System.Int32,System.Int32)">AddItem(string, int, int)</h4>
<div class="markdown level1 summary"><p>Creates a new <a class="xref" href="C1.C1Preview.RenderTocItem.html">RenderTocItem</a> initialized with the specified
text, target page number and level, and adds it to the current TOC.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public RenderTocItem AddItem(string text, int pageNo, int level)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function AddItem(text As String, pageNo As Integer, level As Integer) As RenderTocItem</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">text</span></td>
      <td><p>A text representing the TOC item that is being added.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">pageNo</span></td>
      <td><p>The page number which is the target of the TOC item.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">level</span></td>
      <td><p>The <a class="xref" href="C1.C1Preview.RenderTocItem.Level.html#C1_C1Preview_RenderTocItem_Level">Level</a> of the TOC item.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.C1Preview.RenderTocItem.html">RenderTocItem</a></td>
      <td><p>The <a class="xref" href="C1.C1Preview.RenderTocItem.html">RenderTocItem</a> that was created and added to the current TOC.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_C1Preview_RenderToc_AddItem_" data-uid="C1.C1Preview.RenderToc.AddItem*"></a>
<h4 id="C1_C1Preview_RenderToc_AddItem_System_String_C1_C1Preview_RenderObject_" data-uid="C1.C1Preview.RenderToc.AddItem(System.String,C1.C1Preview.RenderObject)">AddItem(string, RenderObject)</h4>
<div class="markdown level1 summary"><p>Creates a new <a class="xref" href="C1.C1Preview.RenderTocItem.html">RenderTocItem</a> initialized with the specified
text and target <a class="xref" href="C1.C1Preview.RenderObject.html">RenderObject</a>, and adds it to the current TOC.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public RenderTocItem AddItem(string text, RenderObject target)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function AddItem(text As String, target As RenderObject) As RenderTocItem</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">text</span></td>
      <td><p>A text representing the TOC item that is being added.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.C1Preview.RenderObject.html">RenderObject</a></td>
      <td><span class="parametername">target</span></td>
      <td><p>A <a class="xref" href="C1.C1Preview.RenderObject.html">RenderObject</a> which is the target of the TOC item.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.C1Preview.RenderTocItem.html">RenderTocItem</a></td>
      <td><p>The <a class="xref" href="C1.C1Preview.RenderTocItem.html">RenderTocItem</a> that was created and added to the current TOC.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_C1Preview_RenderToc_AddItem_" data-uid="C1.C1Preview.RenderToc.AddItem*"></a>
<h4 id="C1_C1Preview_RenderToc_AddItem_System_String_C1_C1Preview_RenderObject_System_Int32_" data-uid="C1.C1Preview.RenderToc.AddItem(System.String,C1.C1Preview.RenderObject,System.Int32)">AddItem(string, RenderObject, int)</h4>
<div class="markdown level1 summary"><p>Creates a new <a class="xref" href="C1.C1Preview.RenderTocItem.html">RenderTocItem</a> initialized with the specified
text, target <a class="xref" href="C1.C1Preview.RenderObject.html">RenderObject</a> and level, and adds it to the current TOC.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public RenderTocItem AddItem(string text, RenderObject target, int level)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function AddItem(text As String, target As RenderObject, level As Integer) As RenderTocItem</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">text</span></td>
      <td><p>A text representing the TOC item that is being added.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.C1Preview.RenderObject.html">RenderObject</a></td>
      <td><span class="parametername">target</span></td>
      <td><p>A <a class="xref" href="C1.C1Preview.RenderObject.html">RenderObject</a> which is the target of the TOC item.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">level</span></td>
      <td><p>The <a class="xref" href="C1.C1Preview.RenderTocItem.Level.html#C1_C1Preview_RenderTocItem_Level">Level</a> of the TOC item.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.C1Preview.RenderTocItem.html">RenderTocItem</a></td>
      <td><p>The <a class="xref" href="C1.C1Preview.RenderTocItem.html">RenderTocItem</a> that was created and added to the current TOC.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_C1Preview_RenderToc_AddItem_" data-uid="C1.C1Preview.RenderToc.AddItem*"></a>
<h4 id="C1_C1Preview_RenderToc_AddItem_System_String_C1_C1Preview_ParagraphObject_" data-uid="C1.C1Preview.RenderToc.AddItem(System.String,C1.C1Preview.ParagraphObject)">AddItem(string, ParagraphObject)</h4>
<div class="markdown level1 summary"><p>Creates a new <a class="xref" href="C1.C1Preview.RenderTocItem.html">RenderTocItem</a> initialized with the specified
text and target <a class="xref" href="C1.C1Preview.ParagraphObject.html">ParagraphObject</a>, and adds it to the current TOC.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public RenderTocItem AddItem(string text, ParagraphObject target)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function AddItem(text As String, target As ParagraphObject) As RenderTocItem</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">text</span></td>
      <td><p>A text representing the TOC item that is being added.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.C1Preview.ParagraphObject.html">ParagraphObject</a></td>
      <td><span class="parametername">target</span></td>
      <td><p>A <a class="xref" href="C1.C1Preview.ParagraphObject.html">ParagraphObject</a> which is the target of the TOC item.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.C1Preview.RenderTocItem.html">RenderTocItem</a></td>
      <td><p>The <a class="xref" href="C1.C1Preview.RenderTocItem.html">RenderTocItem</a> that was created and added to the current TOC.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_C1Preview_RenderToc_AddItem_" data-uid="C1.C1Preview.RenderToc.AddItem*"></a>
<h4 id="C1_C1Preview_RenderToc_AddItem_System_String_C1_C1Preview_ParagraphObject_System_Int32_" data-uid="C1.C1Preview.RenderToc.AddItem(System.String,C1.C1Preview.ParagraphObject,System.Int32)">AddItem(string, ParagraphObject, int)</h4>
<div class="markdown level1 summary"><p>Creates a new <a class="xref" href="C1.C1Preview.RenderTocItem.html">RenderTocItem</a> initialized with the specified
text, target <a class="xref" href="C1.C1Preview.ParagraphObject.html">ParagraphObject</a> and level, and adds it to the current TOC.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public RenderTocItem AddItem(string text, ParagraphObject target, int level)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function AddItem(text As String, target As ParagraphObject, level As Integer) As RenderTocItem</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">text</span></td>
      <td><p>A text representing the TOC item that is being added.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.C1Preview.ParagraphObject.html">ParagraphObject</a></td>
      <td><span class="parametername">target</span></td>
      <td><p>A <a class="xref" href="C1.C1Preview.ParagraphObject.html">ParagraphObject</a> which is the target of the TOC item.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">level</span></td>
      <td><p>The <a class="xref" href="C1.C1Preview.RenderTocItem.Level.html#C1_C1Preview_RenderTocItem_Level">Level</a> of the TOC item.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.C1Preview.RenderTocItem.html">RenderTocItem</a></td>
      <td><p>The <a class="xref" href="C1.C1Preview.RenderTocItem.html">RenderTocItem</a> that was created and added to the current TOC.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
