# C1.Win.Themes.Shared.ScrollBarAnnotation.-ctor

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_Themes_Shared_ScrollBarAnnotation__ctor_" data-uid="C1.Win.Themes.Shared.ScrollBarAnnotation.#ctor*">ScrollBarAnnotation Constructor
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_Themes_Shared_ScrollBarAnnotation__ctor_" data-uid="C1.Win.Themes.Shared.ScrollBarAnnotation.#ctor*"></a>
<h4 id="C1_Win_Themes_Shared_ScrollBarAnnotation__ctor_System_String_System_Double_System_Nullable_System_Drawing_Color__System_Windows_Forms_HorizontalAlignment_System_Int32_System_Int32_" data-uid="C1.Win.Themes.Shared.ScrollBarAnnotation.#ctor(System.String,System.Double,System.Nullable{System.Drawing.Color},System.Windows.Forms.HorizontalAlignment,System.Int32,System.Int32)">ScrollBarAnnotation(string, double, Color?, HorizontalAlignment, int, int)</h4>
<div class="markdown level1 summary"><p>Creates instance.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public ScrollBarAnnotation(string text, double position, Color? color = null, HorizontalAlignment alignment = HorizontalAlignment.Center, int width = 100, int height = 2)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(text As String, position As Double, Optional color As Color? = Nothing, Optional alignment As HorizontalAlignment = HorizontalAlignment.Center, Optional width As Integer = 100, Optional height As Integer = 2)</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>Text.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></td>
      <td><span class="parametername">position</span></td>
      <td><p>Position from the top.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.color">Color</a>?</td>
      <td><span class="parametername">color</span></td>
      <td><p>Color.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.horizontalalignment">HorizontalAlignment</a></td>
      <td><span class="parametername">alignment</span></td>
      <td><p>Alignment.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">width</span></td>
      <td><p>Width in percatage.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">height</span></td>
      <td><p>Height in pixels.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
