# GrapeCity.Wpf.SpreadSheet.CellType.Editors.BlackoutDatesCollection

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_BlackoutDatesCollection" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.BlackoutDatesCollection" class="text-break">BlackoutDatesCollection Class
</h1>
  <div class="markdown level0 summary"><p>Represents a collection of non-selectable dates in a GrapeCity.Windows.InputMan.GcDropDownCalendar.</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="GrapeCity.Wpf.SpreadSheet.CellType.Editors.CalendarDateRange.html">CalendarDateRange</a>&gt;</div>
    <div class="level2"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.objectmodel.observablecollection-1">ObservableCollection</a>&lt;<a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.CalendarDateRange.html">CalendarDateRange</a>&gt;</div>
    <div class="level3"><span class="xref">BlackoutDatesCollection</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="GrapeCity.Wpf.SpreadSheet.CellType.Editors.CalendarDateRange.html">CalendarDateRange</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="GrapeCity.Wpf.SpreadSheet.CellType.Editors.CalendarDateRange.html">CalendarDateRange</a>&gt;</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.generic.ireadonlylist-1">IReadOnlyList</a>&lt;<a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.CalendarDateRange.html">CalendarDateRange</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="GrapeCity.Wpf.SpreadSheet.CellType.Editors.CalendarDateRange.html">CalendarDateRange</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="GrapeCity.Wpf.SpreadSheet.CellType.Editors.CalendarDateRange.html">CalendarDateRange</a>&gt;</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.collections.specialized.inotifycollectionchanged">INotifyCollectionChanged</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.inotifypropertychanged">INotifyPropertyChanged</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.html">GrapeCity.Wpf.SpreadSheet.CellType.Editors</a></h6>
  <h6><strong>Assembly</strong>: GrapeCity.Wpf.SpreadSheet.CellType.dll</h6>
  <h5 id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_BlackoutDatesCollection_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public sealed class BlackoutDatesCollection : ObservableCollection&lt;CalendarDateRange&gt;, IList&lt;CalendarDateRange&gt;, ICollection&lt;CalendarDateRange&gt;, IList, ICollection, IReadOnlyList&lt;CalendarDateRange&gt;, IReadOnlyCollection&lt;CalendarDateRange&gt;, IEnumerable&lt;CalendarDateRange&gt;, IEnumerable, INotifyCollectionChanged, INotifyPropertyChanged</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public NotInheritable Class BlackoutDatesCollection
    Inherits ObservableCollection(Of CalendarDateRange)
    Implements IList(Of CalendarDateRange), ICollection(Of CalendarDateRange), IList, ICollection, IReadOnlyList(Of CalendarDateRange), IReadOnlyCollection(Of CalendarDateRange), IEnumerable(Of CalendarDateRange), IEnumerable, INotifyCollectionChanged, INotifyPropertyChanged</code></pre>
  </div>
  <h5 id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_BlackoutDatesCollection_remarks"><strong>Remarks</strong></h5>
  <div class="markdown level0 remarks"><p>The <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.BlackoutDatesCollection.html">BlackoutDatesCollection</a> contains GrapeCity.Windows.InputMan.CalendarDateRange objects, which enables you to specify multiple dates that cannot be selected by a user.
To make all past dates not selectable, you can use the <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.BlackoutDatesCollection.AddDatesInPast.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_BlackoutDatesCollection_AddDatesInPast">AddDatesInPast()</a> method.</p>
</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="GrapeCity_Wpf_SpreadSheet_CellType_Editors_BlackoutDatesCollection__ctor_GrapeCity_Wpf_SpreadSheet_CellType_Editors_BlackoutDatesCollection_" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.BlackoutDatesCollection.#ctor(GrapeCity.Wpf.SpreadSheet.CellType.Editors.BlackoutDatesCollection)">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.BlackoutDatesCollection.-ctor.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_BlackoutDatesCollection__ctor_GrapeCity_Wpf_SpreadSheet_CellType_Editors_BlackoutDatesCollection_">BlackoutDatesCollection(BlackoutDatesCollection)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.BlackoutDatesCollection.html">BlackoutDatesCollection</a> class based on existed instance.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_BlackoutDatesCollection__ctor_GrapeCity_Wpf_SpreadSheet_CellType_Editors_GcDropDownCalendar_" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.BlackoutDatesCollection.#ctor(GrapeCity.Wpf.SpreadSheet.CellType.Editors.GcDropDownCalendar)">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.BlackoutDatesCollection.-ctor.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_BlackoutDatesCollection__ctor_GrapeCity_Wpf_SpreadSheet_CellType_Editors_GcDropDownCalendar_">BlackoutDatesCollection(GcDropDownCalendar)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.BlackoutDatesCollection.html">BlackoutDatesCollection</a> class.</p>
</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="GrapeCity_Wpf_SpreadSheet_CellType_Editors_BlackoutDatesCollection_AddDatesInPast" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.BlackoutDatesCollection.AddDatesInPast">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.BlackoutDatesCollection.AddDatesInPast.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_BlackoutDatesCollection_AddDatesInPast">AddDatesInPast()</a>
        </td>
        <td class="markdown level1 summary"><p>Adds all dates before <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetime.today">Today</a> to the <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.BlackoutDatesCollection.html">BlackoutDatesCollection</a>.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_BlackoutDatesCollection_ClearItems" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.BlackoutDatesCollection.ClearItems">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.BlackoutDatesCollection.ClearItems.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_BlackoutDatesCollection_ClearItems">ClearItems()</a>
        </td>
        <td class="markdown level1 summary"><p>Removes all items from the collection.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_BlackoutDatesCollection_Clone" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.BlackoutDatesCollection.Clone">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.BlackoutDatesCollection.Clone.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_BlackoutDatesCollection_Clone">Clone()</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_BlackoutDatesCollection_Contains_GrapeCity_Wpf_SpreadSheet_CellType_Editors_CalendarDateRange_" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.BlackoutDatesCollection.Contains(GrapeCity.Wpf.SpreadSheet.CellType.Editors.CalendarDateRange)">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.BlackoutDatesCollection.Contains.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_BlackoutDatesCollection_Contains_GrapeCity_Wpf_SpreadSheet_CellType_Editors_CalendarDateRange_">Contains(CalendarDateRange)</a>
        </td>
        <td class="markdown level1 summary"><p>Checks if a GrapeCity.Windows.InputMan.CalendarDateRange is in the collection.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_BlackoutDatesCollection_Contains_System_DateTime_" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.BlackoutDatesCollection.Contains(System.DateTime)">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.BlackoutDatesCollection.Contains.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_BlackoutDatesCollection_Contains_System_DateTime_">Contains(DateTime)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns a value that represents whether this collection contains the specified date.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_BlackoutDatesCollection_Contains_System_DateTime_System_DateTime_" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.BlackoutDatesCollection.Contains(System.DateTime,System.DateTime)">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.BlackoutDatesCollection.Contains.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_BlackoutDatesCollection_Contains_System_DateTime_System_DateTime_">Contains(DateTime, DateTime)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns a value that represents whether this collection contains the specified range of dates.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_BlackoutDatesCollection_ContainsAny_GrapeCity_Wpf_SpreadSheet_CellType_Editors_CalendarDateRange_" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.BlackoutDatesCollection.ContainsAny(GrapeCity.Wpf.SpreadSheet.CellType.Editors.CalendarDateRange)">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.BlackoutDatesCollection.ContainsAny.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_BlackoutDatesCollection_ContainsAny_GrapeCity_Wpf_SpreadSheet_CellType_Editors_CalendarDateRange_">ContainsAny(CalendarDateRange)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns a value that represents whether this collection contains any dates in the specified range of dates.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_BlackoutDatesCollection_InsertItem_System_Int32_GrapeCity_Wpf_SpreadSheet_CellType_Editors_CalendarDateRange_" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.BlackoutDatesCollection.InsertItem(System.Int32,GrapeCity.Wpf.SpreadSheet.CellType.Editors.CalendarDateRange)">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.BlackoutDatesCollection.InsertItem.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_BlackoutDatesCollection_InsertItem_System_Int32_GrapeCity_Wpf_SpreadSheet_CellType_Editors_CalendarDateRange_">InsertItem(int, CalendarDateRange)</a>
        </td>
        <td class="markdown level1 summary"><p>Inserts an item into the collection at the specified index.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_BlackoutDatesCollection_RemoveItem_System_Int32_" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.BlackoutDatesCollection.RemoveItem(System.Int32)">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.BlackoutDatesCollection.RemoveItem.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_BlackoutDatesCollection_RemoveItem_System_Int32_">RemoveItem(int)</a>
        </td>
        <td class="markdown level1 summary"><p>Removes the item at the specified index of the collection.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_BlackoutDatesCollection_SetItem_System_Int32_GrapeCity_Wpf_SpreadSheet_CellType_Editors_CalendarDateRange_" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.BlackoutDatesCollection.SetItem(System.Int32,GrapeCity.Wpf.SpreadSheet.CellType.Editors.CalendarDateRange)">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.BlackoutDatesCollection.SetItem.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_BlackoutDatesCollection_SetItem_System_Int32_GrapeCity_Wpf_SpreadSheet_CellType_Editors_CalendarDateRange_">SetItem(int, CalendarDateRange)</a>
        </td>
        <td class="markdown level1 summary"><p>Replaces the element at the specified index.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
