# C1.C1Pdf.C1PdfDocumentBase.SetDashPattern

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_C1Pdf_C1PdfDocumentBase_SetDashPattern_" data-uid="C1.C1Pdf.C1PdfDocumentBase.SetDashPattern*">SetDashPattern Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_C1Pdf_C1PdfDocumentBase_SetDashPattern_" data-uid="C1.C1Pdf.C1PdfDocumentBase.SetDashPattern*"></a>
<h4 id="C1_C1Pdf_C1PdfDocumentBase_SetDashPattern_System_Drawing_Drawing2D_DashStyle_System_Single___" data-uid="C1.C1Pdf.C1PdfDocumentBase.SetDashPattern(System.Drawing.Drawing2D.DashStyle,System.Single[])">SetDashPattern(DashStyle, float[])</h4>
<div class="markdown level1 summary"><p>Sets the dash pattern for a specific dash style.
Values in <code class="paramref">pattern</code> correspond to dashes and spaces, starting with the first dash.
The actual length of each dash and space in the line is the product of the specified value and the width of the pen used to draw the line.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void SetDashPattern(DashStyle dashStyle, float[] pattern)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub SetDashPattern(dashStyle As DashStyle, pattern As Single())</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.drawing.drawing2d.dashstyle">DashStyle</a></td>
      <td><span class="parametername">dashStyle</span></td>
      <td><p>The dash style to set.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a>[]</td>
      <td><span class="parametername">pattern</span></td>
      <td><p>The array of stroke and gap lengths, in line thickness.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_C1Pdf_C1PdfDocumentBase_SetDashPattern_System_Drawing_Drawing2D_DashStyle_System_Single____seealso">See Also</h5>
<div class="seealso">
    <div><a class="xref" href="C1.C1Pdf.C1PdfDocumentBase.ResetDashPatterns.html#C1_C1Pdf_C1PdfDocumentBase_ResetDashPatterns">ResetDashPatterns</a>()</div>
</div>
</div>
