# C1.C1Preview.LineDef.-ctor

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_C1Preview_LineDef__ctor_" data-uid="C1.C1Preview.LineDef.#ctor*">LineDef Constructor
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_C1Preview_LineDef__ctor_" data-uid="C1.C1Preview.LineDef.#ctor*"></a>
<h4 id="C1_C1Preview_LineDef__ctor" data-uid="C1.C1Preview.LineDef.#ctor">LineDef()</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.C1Preview.LineDef.html">LineDef</a> class
with default values (1pt wide black line).</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public LineDef()</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New()</code></pre>
</div>


<a id="C1_C1Preview_LineDef__ctor_" data-uid="C1.C1Preview.LineDef.#ctor*"></a>
<h4 id="C1_C1Preview_LineDef__ctor_System_Windows_Media_Color_" data-uid="C1.C1Preview.LineDef.#ctor(System.Windows.Media.Color)">LineDef(Color)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.C1Preview.LineDef.html">LineDef</a> class,
assigning line color.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public LineDef(Color color)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(color As Color)</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.windows.media.color">Color</a></td>
      <td><span class="parametername">color</span></td>
      <td><p>A value assigned to the <a class="xref" href="C1.C1Preview.LineDef.Color.html#C1_C1Preview_LineDef_Color">Color</a> property.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_C1Preview_LineDef__ctor_" data-uid="C1.C1Preview.LineDef.#ctor*"></a>
<h4 id="C1_C1Preview_LineDef__ctor_C1_C1Preview_Unit_System_Windows_Media_Color_" data-uid="C1.C1Preview.LineDef.#ctor(C1.C1Preview.Unit,System.Windows.Media.Color)">LineDef(Unit, Color)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.C1Preview.LineDef.html">LineDef</a> class,
assigning line width and color.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public LineDef(Unit width, Color color)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(width As Unit, color As Color)</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="C1.C1Preview.Unit.html">Unit</a></td>
      <td><span class="parametername">width</span></td>
      <td><p>A value assigned to the <a class="xref" href="C1.C1Preview.LineDef.Color.html#C1_C1Preview_LineDef_Color">Color</a> property.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.media.color">Color</a></td>
      <td><span class="parametername">color</span></td>
      <td><p>A value assigned to the <a class="xref" href="C1.C1Preview.LineDef.Color.html#C1_C1Preview_LineDef_Color">Color</a> property.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_C1Preview_LineDef__ctor_" data-uid="C1.C1Preview.LineDef.#ctor*"></a>
<h4 id="C1_C1Preview_LineDef__ctor_C1_C1Preview_Unit_System_Windows_Media_Color_System_Drawing_Drawing2D_DashStyle_" data-uid="C1.C1Preview.LineDef.#ctor(C1.C1Preview.Unit,System.Windows.Media.Color,System.Drawing.Drawing2D.DashStyle)">LineDef(Unit, Color, DashStyle)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.C1Preview.LineDef.html">LineDef</a> class,
assigning line width, color and dash style.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public LineDef(Unit width, Color color, DashStyle style)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(width As Unit, color As Color, style As DashStyle)</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="C1.C1Preview.Unit.html">Unit</a></td>
      <td><span class="parametername">width</span></td>
      <td><p>A value assigned to the <a class="xref" href="C1.C1Preview.LineDef.Color.html#C1_C1Preview_LineDef_Color">Color</a> property.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.media.color">Color</a></td>
      <td><span class="parametername">color</span></td>
      <td><p>A value assigned to the <a class="xref" href="C1.C1Preview.LineDef.Color.html#C1_C1Preview_LineDef_Color">Color</a> property.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.drawing2d.dashstyle">DashStyle</a></td>
      <td><span class="parametername">style</span></td>
      <td><p>A value assigned to the <a class="xref" href="C1.C1Preview.LineDef.DashStyle.html#C1_C1Preview_LineDef_DashStyle">DashStyle</a> property.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_C1Preview_LineDef__ctor_" data-uid="C1.C1Preview.LineDef.#ctor*"></a>
<h4 id="C1_C1Preview_LineDef__ctor_C1_C1Preview_Unit_System_Windows_Media_Color_System_Single___" data-uid="C1.C1Preview.LineDef.#ctor(C1.C1Preview.Unit,System.Windows.Media.Color,System.Single[])">LineDef(Unit, Color, float[])</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.C1Preview.LineDef.html">LineDef</a> class,
assigning line width, color and dash pattern.
<a class="xref" href="C1.C1Preview.LineDef.DashStyle.html#C1_C1Preview_LineDef_DashStyle">DashStyle</a> is set to <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.drawing2d.dashstyle#system-drawing-drawing2d-dashstyle-custom">Custom</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public LineDef(Unit width, Color color, float[] dashPattern)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(width As Unit, color As Color, dashPattern 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="C1.C1Preview.Unit.html">Unit</a></td>
      <td><span class="parametername">width</span></td>
      <td><p>A value assigned to the <a class="xref" href="C1.C1Preview.LineDef.Color.html#C1_C1Preview_LineDef_Color">Color</a> property.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.media.color">Color</a></td>
      <td><span class="parametername">color</span></td>
      <td><p>A value assigned to the <a class="xref" href="C1.C1Preview.LineDef.Color.html#C1_C1Preview_LineDef_Color">Color</a> property.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a>[]</td>
      <td><span class="parametername">dashPattern</span></td>
      <td><p>A value assigned to the <a class="xref" href="C1.C1Preview.LineDef.DashPattern.html#C1_C1Preview_LineDef_DashPattern">DashPattern</a> property.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_C1Preview_LineDef__ctor_" data-uid="C1.C1Preview.LineDef.#ctor*"></a>
<h4 id="C1_C1Preview_LineDef__ctor_C1_C1Preview_Unit_System_Windows_Media_Color_System_Windows_Media_Color_System_Drawing_Drawing2D_DashStyle_" data-uid="C1.C1Preview.LineDef.#ctor(C1.C1Preview.Unit,System.Windows.Media.Color,System.Windows.Media.Color,System.Drawing.Drawing2D.DashStyle)">LineDef(Unit, Color, Color, DashStyle)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.C1Preview.LineDef.html">LineDef</a> class,
assigning line width, color, dash background color and dash style.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public LineDef(Unit width, Color color, Color backColor, DashStyle style)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(width As Unit, color As Color, backColor As Color, style As DashStyle)</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="C1.C1Preview.Unit.html">Unit</a></td>
      <td><span class="parametername">width</span></td>
      <td><p>A value assigned to the <a class="xref" href="C1.C1Preview.LineDef.Color.html#C1_C1Preview_LineDef_Color">Color</a> property.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.media.color">Color</a></td>
      <td><span class="parametername">color</span></td>
      <td><p>A value assigned to the <a class="xref" href="C1.C1Preview.LineDef.Color.html#C1_C1Preview_LineDef_Color">Color</a> property.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.media.color">Color</a></td>
      <td><span class="parametername">backColor</span></td>
      <td><p>A value assigned to the <a class="xref" href="C1.C1Preview.LineDef.BackColor.html#C1_C1Preview_LineDef_BackColor">BackColor</a> property.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.drawing2d.dashstyle">DashStyle</a></td>
      <td><span class="parametername">style</span></td>
      <td><p>A value assigned to the <a class="xref" href="C1.C1Preview.LineDef.DashStyle.html#C1_C1Preview_LineDef_DashStyle">DashStyle</a> property.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_C1Preview_LineDef__ctor_" data-uid="C1.C1Preview.LineDef.#ctor*"></a>
<h4 id="C1_C1Preview_LineDef__ctor_C1_C1Preview_Unit_System_Windows_Media_Color_System_Windows_Media_Color_System_Single___" data-uid="C1.C1Preview.LineDef.#ctor(C1.C1Preview.Unit,System.Windows.Media.Color,System.Windows.Media.Color,System.Single[])">LineDef(Unit, Color, Color, float[])</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.C1Preview.LineDef.html">LineDef</a> class,
assigning line width, color, dash background color and dash pattern.
<a class="xref" href="C1.C1Preview.LineDef.DashStyle.html#C1_C1Preview_LineDef_DashStyle">DashStyle</a> is set to <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.drawing2d.dashstyle#system-drawing-drawing2d-dashstyle-custom">Custom</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public LineDef(Unit width, Color color, Color backColor, float[] dashPattern)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(width As Unit, color As Color, backColor As Color, dashPattern 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="C1.C1Preview.Unit.html">Unit</a></td>
      <td><span class="parametername">width</span></td>
      <td><p>A value assigned to the <a class="xref" href="C1.C1Preview.LineDef.Color.html#C1_C1Preview_LineDef_Color">Color</a> property.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.media.color">Color</a></td>
      <td><span class="parametername">color</span></td>
      <td><p>A value assigned to the <a class="xref" href="C1.C1Preview.LineDef.Color.html#C1_C1Preview_LineDef_Color">Color</a> property.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.media.color">Color</a></td>
      <td><span class="parametername">backColor</span></td>
      <td><p>A value assigned to the <a class="xref" href="C1.C1Preview.LineDef.BackColor.html#C1_C1Preview_LineDef_BackColor">BackColor</a> property.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a>[]</td>
      <td><span class="parametername">dashPattern</span></td>
      <td><p>A value assigned to the <a class="xref" href="C1.C1Preview.LineDef.DashPattern.html#C1_C1Preview_LineDef_DashPattern">DashPattern</a> property.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
