# C1.Win.GanttView.BarStyleCollection

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_Win_GanttView_BarStyleCollection" data-uid="C1.Win.GanttView.BarStyleCollection" class="text-break">BarStyleCollection Class
</h1>
  <div class="markdown level0 summary"><p>Represents a collection of bar styles.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.objectmodel.collection-1">Collection</a>&lt;<a class="xref" href="C1.Win.GanttView.BarStyle.html">BarStyle</a>&gt;</div>
    <div class="level2"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.bindinglist-1">BindingList</a>&lt;<a class="xref" href="C1.Win.GanttView.BarStyle.html">BarStyle</a>&gt;</div>
    <div class="level3"><span class="xref">BarStyleCollection</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1">IList</a>&lt;<a class="xref" href="C1.Win.GanttView.BarStyle.html">BarStyle</a>&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection</a>&lt;<a class="xref" href="C1.Win.GanttView.BarStyle.html">BarStyle</a>&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1">IReadOnlyList</a>&lt;<a class="xref" href="C1.Win.GanttView.BarStyle.html">BarStyle</a>&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlycollection-1">IReadOnlyCollection</a>&lt;<a class="xref" href="C1.Win.GanttView.BarStyle.html">BarStyle</a>&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a class="xref" href="C1.Win.GanttView.BarStyle.html">BarStyle</a>&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.ibindinglist">IBindingList</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.ilist">IList</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.icollection">ICollection</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.ienumerable">IEnumerable</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.icanceladdnew">ICancelAddNew</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.iraiseitemchangedevents">IRaiseItemChangedEvents</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.Win.GanttView.html">C1.Win.GanttView</a></h6>
  <h6><strong>Assembly</strong>: C1.Win.GanttView.10.dll</h6>
  <h5 id="C1_Win_GanttView_BarStyleCollection_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">[ListBindable(false)]
public class BarStyleCollection : BindingList&lt;BarStyle&gt;, IList&lt;BarStyle&gt;, ICollection&lt;BarStyle&gt;, IReadOnlyList&lt;BarStyle&gt;, IReadOnlyCollection&lt;BarStyle&gt;, IEnumerable&lt;BarStyle&gt;, IBindingList, IList, ICollection, IEnumerable, ICancelAddNew, IRaiseItemChangedEvents</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">&lt;ListBindable(False)&gt;
Public Class BarStyleCollection
    Inherits BindingList(Of BarStyle)
    Implements IList(Of BarStyle), ICollection(Of BarStyle), IReadOnlyList(Of BarStyle), IReadOnlyCollection(Of BarStyle), IEnumerable(Of BarStyle), IBindingList, IList, ICollection, IEnumerable, ICancelAddNew, IRaiseItemChangedEvents</code></pre>
  </div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Win_GanttView_BarStyleCollection__ctor" data-uid="C1.Win.GanttView.BarStyleCollection.#ctor">
          <a class="xref" href="C1.Win.GanttView.BarStyleCollection.-ctor.html#C1_Win_GanttView_BarStyleCollection__ctor">BarStyleCollection()</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Win_GanttView_BarStyleCollection_ClearAndDispose" data-uid="C1.Win.GanttView.BarStyleCollection.ClearAndDispose">
          <a class="xref" href="C1.Win.GanttView.BarStyleCollection.ClearAndDispose.html#C1_Win_GanttView_BarStyleCollection_ClearAndDispose">ClearAndDispose()</a>
        </td>
        <td class="markdown level1 summary"><p>Removes all styles from the collection, then disposes the styles.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_GanttView_BarStyleCollection_ClearItems" data-uid="C1.Win.GanttView.BarStyleCollection.ClearItems">
          <a class="xref" href="C1.Win.GanttView.BarStyleCollection.ClearItems.html#C1_Win_GanttView_BarStyleCollection_ClearItems">ClearItems()</a>
        </td>
        <td class="markdown level1 summary"><p>Removes all items from the collection.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_GanttView_BarStyleCollection_IndexOf_C1_Win_GanttView_BarType_" data-uid="C1.Win.GanttView.BarStyleCollection.IndexOf(C1.Win.GanttView.BarType)">
          <a class="xref" href="C1.Win.GanttView.BarStyleCollection.IndexOf.html#C1_Win_GanttView_BarStyleCollection_IndexOf_C1_Win_GanttView_BarType_">IndexOf(BarType)</a>
        </td>
        <td class="markdown level1 summary"><p>Searches for the specified bar type and returns the zero-based index of the first occurrence.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_GanttView_BarStyleCollection_InsertItem_System_Int32_C1_Win_GanttView_BarStyle_" data-uid="C1.Win.GanttView.BarStyleCollection.InsertItem(System.Int32,C1.Win.GanttView.BarStyle)">
          <a class="xref" href="C1.Win.GanttView.BarStyleCollection.InsertItem.html#C1_Win_GanttView_BarStyleCollection_InsertItem_System_Int32_C1_Win_GanttView_BarStyle_">InsertItem(int, BarStyle)</a>
        </td>
        <td class="markdown level1 summary"><p>Inserts an item at the specified index.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_GanttView_BarStyleCollection_RemoveItem_System_Int32_" data-uid="C1.Win.GanttView.BarStyleCollection.RemoveItem(System.Int32)">
          <a class="xref" href="C1.Win.GanttView.BarStyleCollection.RemoveItem.html#C1_Win_GanttView_BarStyleCollection_RemoveItem_System_Int32_">RemoveItem(int)</a>
        </td>
        <td class="markdown level1 summary"><p>Removes the item at the specified index.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_GanttView_BarStyleCollection_Search_C1_Win_GanttView_BarType_" data-uid="C1.Win.GanttView.BarStyleCollection.Search(C1.Win.GanttView.BarType)">
          <a class="xref" href="C1.Win.GanttView.BarStyleCollection.Search.html#C1_Win_GanttView_BarStyleCollection_Search_C1_Win_GanttView_BarType_">Search(BarType)</a>
        </td>
        <td class="markdown level1 summary"><p>Searches for a <a class="xref" href="C1.Win.GanttView.BarStyle.html">BarStyle</a> with the specified bar type.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_GanttView_BarStyleCollection_SetItem_System_Int32_C1_Win_GanttView_BarStyle_" data-uid="C1.Win.GanttView.BarStyleCollection.SetItem(System.Int32,C1.Win.GanttView.BarStyle)">
          <a class="xref" href="C1.Win.GanttView.BarStyleCollection.SetItem.html#C1_Win_GanttView_BarStyleCollection_SetItem_System_Int32_C1_Win_GanttView_BarStyle_">SetItem(int, BarStyle)</a>
        </td>
        <td class="markdown level1 summary"><p>Replaces the item at the specified index.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
