# FarPoint.Win.Spread.NamedStyleCollection

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="FarPoint_Win_Spread_NamedStyleCollection" data-uid="FarPoint.Win.Spread.NamedStyleCollection" class="text-break">NamedStyleCollection Class
</h1>
  <div class="markdown level0 summary"><p>Represents a collection of custom styles (NamedStyle objects).</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"><span class="xref">NamedStyleCollection</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <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="../FarPoint.Win/FarPoint.Win.ICanSerializeXml.html">ICanSerializeXml</a></div>
    <div><a class="xref" href="../FarPoint.Win/FarPoint.Win.ISerializeSupport.html">ISerializeSupport</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.runtime.serialization.iserializable">ISerializable</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="FarPoint.Win.Spread.html">FarPoint.Win.Spread</a></h6>
  <h6><strong>Assembly</strong>: FarPoint.Win.Spread.dll</h6>
  <h5 id="FarPoint_Win_Spread_NamedStyleCollection_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">[TypeConverter(typeof(_wv))]
public class NamedStyleCollection : IList, ICollection, IEnumerable, ICanSerializeXml, ISerializeSupport, ISerializable</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">&lt;TypeConverter(GetType(_wv))&gt;
Public Class NamedStyleCollection
    Implements IList, ICollection, IEnumerable, ICanSerializeXml, ISerializeSupport, ISerializable</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="FarPoint_Win_Spread_NamedStyleCollection__ctor" data-uid="FarPoint.Win.Spread.NamedStyleCollection.#ctor">
          <a class="xref" href="FarPoint.Win.Spread.NamedStyleCollection.-ctor.html#FarPoint_Win_Spread_NamedStyleCollection__ctor">NamedStyleCollection()</a>
        </td>
        <td class="markdown level1 summary"><p>Creates a custom style collection (NamedStyleCollection object).</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Win_Spread_NamedStyleCollection__ctor_System_Runtime_Serialization_SerializationInfo_System_Runtime_Serialization_StreamingContext_" data-uid="FarPoint.Win.Spread.NamedStyleCollection.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
          <a class="xref" href="FarPoint.Win.Spread.NamedStyleCollection.-ctor.html#FarPoint_Win_Spread_NamedStyleCollection__ctor_System_Runtime_Serialization_SerializationInfo_System_Runtime_Serialization_StreamingContext_">NamedStyleCollection(SerializationInfo, StreamingContext)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="FarPoint.Win.Spread.NamedStyleCollection.html">NamedStyleCollection</a> class.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="fields">Fields
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="FarPoint_Win_Spread_NamedStyleCollection_DefaultStyles" data-uid="FarPoint.Win.Spread.NamedStyleCollection.DefaultStyles">
          <a class="xref" href="FarPoint.Win.Spread.NamedStyleCollection.DefaultStyles.html">DefaultStyles</a>
        </td>
        <td class="markdown level1 summary"><p>Represents the read-only collection of default styles.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="FarPoint_Win_Spread_NamedStyleCollection_CanSerializeXml" data-uid="FarPoint.Win.Spread.NamedStyleCollection.CanSerializeXml">
          <a class="xref" href="FarPoint.Win.Spread.NamedStyleCollection.CanSerializeXml.html#FarPoint_Win_Spread_NamedStyleCollection_CanSerializeXml">CanSerializeXml</a>
        </td>
        <td class="markdown level1 summary"><p>Gets whether the object in its entirety can be rendered with XML without losing any information.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Win_Spread_NamedStyleCollection_Count" data-uid="FarPoint.Win.Spread.NamedStyleCollection.Count">
          <a class="xref" href="FarPoint.Win.Spread.NamedStyleCollection.Count.html#FarPoint_Win_Spread_NamedStyleCollection_Count">Count</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the number of styles (NamedStyle objects) in the collection.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Win_Spread_NamedStyleCollection_IsFixedSize" data-uid="FarPoint.Win.Spread.NamedStyleCollection.IsFixedSize">
          <a class="xref" href="FarPoint.Win.Spread.NamedStyleCollection.IsFixedSize.html#FarPoint_Win_Spread_NamedStyleCollection_IsFixedSize">IsFixedSize</a>
        </td>
        <td class="markdown level1 summary"><p>Gets whether the collection has a fixed size.
(This implementation always returns false.)</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Win_Spread_NamedStyleCollection_IsReadOnly" data-uid="FarPoint.Win.Spread.NamedStyleCollection.IsReadOnly">
          <a class="xref" href="FarPoint.Win.Spread.NamedStyleCollection.IsReadOnly.html#FarPoint_Win_Spread_NamedStyleCollection_IsReadOnly">IsReadOnly</a>
        </td>
        <td class="markdown level1 summary"><p>Gets whether the collection is read-only.
(This implementation always returns false.)</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Win_Spread_NamedStyleCollection_IsSynchronized" data-uid="FarPoint.Win.Spread.NamedStyleCollection.IsSynchronized">
          <a class="xref" href="FarPoint.Win.Spread.NamedStyleCollection.IsSynchronized.html#FarPoint_Win_Spread_NamedStyleCollection_IsSynchronized">IsSynchronized</a>
        </td>
        <td class="markdown level1 summary"><p>Gets whether access to the collection is synchronized.
(This implementation always returns false.)</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Win_Spread_NamedStyleCollection_Item_System_Int32_" data-uid="FarPoint.Win.Spread.NamedStyleCollection.Item(System.Int32)">
          <a class="xref" href="FarPoint.Win.Spread.NamedStyleCollection.Item.html#FarPoint_Win_Spread_NamedStyleCollection_Item_System_Int32_">this[int]</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the style (NamedStyle object) at the specified index in the collection.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Win_Spread_NamedStyleCollection_SyncRoot" data-uid="FarPoint.Win.Spread.NamedStyleCollection.SyncRoot">
          <a class="xref" href="FarPoint.Win.Spread.NamedStyleCollection.SyncRoot.html#FarPoint_Win_Spread_NamedStyleCollection_SyncRoot">SyncRoot</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a collection (NamedStyleCollection object) that can be used to
synchronize access.</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="FarPoint_Win_Spread_NamedStyleCollection_Add_FarPoint_Win_Spread_NamedStyle_" data-uid="FarPoint.Win.Spread.NamedStyleCollection.Add(FarPoint.Win.Spread.NamedStyle)">
          <a class="xref" href="FarPoint.Win.Spread.NamedStyleCollection.Add.html#FarPoint_Win_Spread_NamedStyleCollection_Add_FarPoint_Win_Spread_NamedStyle_">Add(NamedStyle)</a>
        </td>
        <td class="markdown level1 summary"><p>Adds a style (NamedStyle object) to the collection.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Win_Spread_NamedStyleCollection_Add_System_String_System_String_" data-uid="FarPoint.Win.Spread.NamedStyleCollection.Add(System.String,System.String)">
          <a class="xref" href="FarPoint.Win.Spread.NamedStyleCollection.Add.html#FarPoint_Win_Spread_NamedStyleCollection_Add_System_String_System_String_">Add(string, string)</a>
        </td>
        <td class="markdown level1 summary"><p>Adds a style (NamedStyle object) to the collection as a child
of the specified parent.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Win_Spread_NamedStyleCollection_AddRange_FarPoint_Win_Spread_NamedStyle___" data-uid="FarPoint.Win.Spread.NamedStyleCollection.AddRange(FarPoint.Win.Spread.NamedStyle[])">
          <a class="xref" href="FarPoint.Win.Spread.NamedStyleCollection.AddRange.html#FarPoint_Win_Spread_NamedStyleCollection_AddRange_FarPoint_Win_Spread_NamedStyle___">AddRange(NamedStyle[])</a>
        </td>
        <td class="markdown level1 summary"><p>Adds an array of NamedStyle objects to the collection.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Win_Spread_NamedStyleCollection_AddRange_System_Collections_ICollection_" data-uid="FarPoint.Win.Spread.NamedStyleCollection.AddRange(System.Collections.ICollection)">
          <a class="xref" href="FarPoint.Win.Spread.NamedStyleCollection.AddRange.html#FarPoint_Win_Spread_NamedStyleCollection_AddRange_System_Collections_ICollection_">AddRange(ICollection)</a>
        </td>
        <td class="markdown level1 summary"><p>Adds an array of styles (NamedStyle objects) to the collection.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Win_Spread_NamedStyleCollection_Clear" data-uid="FarPoint.Win.Spread.NamedStyleCollection.Clear">
          <a class="xref" href="FarPoint.Win.Spread.NamedStyleCollection.Clear.html#FarPoint_Win_Spread_NamedStyleCollection_Clear">Clear()</a>
        </td>
        <td class="markdown level1 summary"><p>Removes all named styles from the collection.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Win_Spread_NamedStyleCollection_Compose_System_Object_FarPoint_Win_Spread_StyleInfo_" data-uid="FarPoint.Win.Spread.NamedStyleCollection.Compose(System.Object,FarPoint.Win.Spread.StyleInfo)">
          <a class="xref" href="FarPoint.Win.Spread.NamedStyleCollection.Compose.html#FarPoint_Win_Spread_NamedStyleCollection_Compose_System_Object_FarPoint_Win_Spread_StyleInfo_">Compose(object, StyleInfo)</a>
        </td>
        <td class="markdown level1 summary"><p>Composes a style, using the current style and
a specified NamedStyle object.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Win_Spread_NamedStyleCollection_Contains_FarPoint_Win_Spread_NamedStyle_" data-uid="FarPoint.Win.Spread.NamedStyleCollection.Contains(FarPoint.Win.Spread.NamedStyle)">
          <a class="xref" href="FarPoint.Win.Spread.NamedStyleCollection.Contains.html#FarPoint_Win_Spread_NamedStyleCollection_Contains_FarPoint_Win_Spread_NamedStyle_">Contains(NamedStyle)</a>
        </td>
        <td class="markdown level1 summary"><p>Determines whether the collection contains the specified style (NamedStyle object).</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Win_Spread_NamedStyleCollection_CopyTo_FarPoint_Win_Spread_NamedStyle___System_Int32_" data-uid="FarPoint.Win.Spread.NamedStyleCollection.CopyTo(FarPoint.Win.Spread.NamedStyle[],System.Int32)">
          <a class="xref" href="FarPoint.Win.Spread.NamedStyleCollection.CopyTo.html#FarPoint_Win_Spread_NamedStyleCollection_CopyTo_FarPoint_Win_Spread_NamedStyle___System_Int32_">CopyTo(NamedStyle[], int)</a>
        </td>
        <td class="markdown level1 summary"><p>Copies the styles in the collection to a specified array at a specified position.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Win_Spread_NamedStyleCollection_CopyTo_System_Array_System_Int32_" data-uid="FarPoint.Win.Spread.NamedStyleCollection.CopyTo(System.Array,System.Int32)">
          <a class="xref" href="FarPoint.Win.Spread.NamedStyleCollection.CopyTo.html#FarPoint_Win_Spread_NamedStyleCollection_CopyTo_System_Array_System_Int32_">CopyTo(Array, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Copies the styles in the collection to a specified array at a specified position.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Win_Spread_NamedStyleCollection_Deserialize_System_Xml_XmlNodeReader_" data-uid="FarPoint.Win.Spread.NamedStyleCollection.Deserialize(System.Xml.XmlNodeReader)">
          <a class="xref" href="FarPoint.Win.Spread.NamedStyleCollection.Deserialize.html#FarPoint_Win_Spread_NamedStyleCollection_Deserialize_System_Xml_XmlNodeReader_">Deserialize(XmlNodeReader)</a>
        </td>
        <td class="markdown level1 summary"><p>Loads the object from XML.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Win_Spread_NamedStyleCollection_Find_System_String_" data-uid="FarPoint.Win.Spread.NamedStyleCollection.Find(System.String)">
          <a class="xref" href="FarPoint.Win.Spread.NamedStyleCollection.Find.html#FarPoint_Win_Spread_NamedStyleCollection_Find_System_String_">Find(string)</a>
        </td>
        <td class="markdown level1 summary"><p>Finds a style (NamedStyle object) in the collection with the specified name.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Win_Spread_NamedStyleCollection_GetEnumerator" data-uid="FarPoint.Win.Spread.NamedStyleCollection.GetEnumerator">
          <a class="xref" href="FarPoint.Win.Spread.NamedStyleCollection.GetEnumerator.html#FarPoint_Win_Spread_NamedStyleCollection_GetEnumerator">GetEnumerator()</a>
        </td>
        <td class="markdown level1 summary"><p>Gets an IEnumerator object for enumerating through the NamedStyle objects
in the collection.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Win_Spread_NamedStyleCollection_GetObjectData_System_Runtime_Serialization_SerializationInfo_System_Runtime_Serialization_StreamingContext_" data-uid="FarPoint.Win.Spread.NamedStyleCollection.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
          <a class="xref" href="FarPoint.Win.Spread.NamedStyleCollection.GetObjectData.html#FarPoint_Win_Spread_NamedStyleCollection_GetObjectData_System_Runtime_Serialization_SerializationInfo_System_Runtime_Serialization_StreamingContext_">GetObjectData(SerializationInfo, StreamingContext)</a>
        </td>
        <td class="markdown level1 summary"><p>Populates a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.runtime.serialization.serializationinfo">SerializationInfo</a> with the data needed to serialize the target object.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Win_Spread_NamedStyleCollection_IndexOf_FarPoint_Win_Spread_NamedStyle_" data-uid="FarPoint.Win.Spread.NamedStyleCollection.IndexOf(FarPoint.Win.Spread.NamedStyle)">
          <a class="xref" href="FarPoint.Win.Spread.NamedStyleCollection.IndexOf.html#FarPoint_Win_Spread_NamedStyleCollection_IndexOf_FarPoint_Win_Spread_NamedStyle_">IndexOf(NamedStyle)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the index of the specified style in the collection.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Win_Spread_NamedStyleCollection_Insert_System_Int32_FarPoint_Win_Spread_NamedStyle_" data-uid="FarPoint.Win.Spread.NamedStyleCollection.Insert(System.Int32,FarPoint.Win.Spread.NamedStyle)">
          <a class="xref" href="FarPoint.Win.Spread.NamedStyleCollection.Insert.html#FarPoint_Win_Spread_NamedStyleCollection_Insert_System_Int32_FarPoint_Win_Spread_NamedStyle_">Insert(int, NamedStyle)</a>
        </td>
        <td class="markdown level1 summary"><p>Inserts a style into the collection at the specified index.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Win_Spread_NamedStyleCollection_OnChanged_FarPoint_Win_Spread_NamedStyleCollectionEventArgs_" data-uid="FarPoint.Win.Spread.NamedStyleCollection.OnChanged(FarPoint.Win.Spread.NamedStyleCollectionEventArgs)">
          <a class="xref" href="FarPoint.Win.Spread.NamedStyleCollection.OnChanged.html#FarPoint_Win_Spread_NamedStyleCollection_OnChanged_FarPoint_Win_Spread_NamedStyleCollectionEventArgs_">OnChanged(NamedStyleCollectionEventArgs)</a>
        </td>
        <td class="markdown level1 summary"><p>Raises the Changed event.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Win_Spread_NamedStyleCollection_Remove_FarPoint_Win_Spread_NamedStyle_" data-uid="FarPoint.Win.Spread.NamedStyleCollection.Remove(FarPoint.Win.Spread.NamedStyle)">
          <a class="xref" href="FarPoint.Win.Spread.NamedStyleCollection.Remove.html#FarPoint_Win_Spread_NamedStyleCollection_Remove_FarPoint_Win_Spread_NamedStyle_">Remove(NamedStyle)</a>
        </td>
        <td class="markdown level1 summary"><p>Removes the specified named style from the collection.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Win_Spread_NamedStyleCollection_RemoveAt_System_Int32_" data-uid="FarPoint.Win.Spread.NamedStyleCollection.RemoveAt(System.Int32)">
          <a class="xref" href="FarPoint.Win.Spread.NamedStyleCollection.RemoveAt.html#FarPoint_Win_Spread_NamedStyleCollection_RemoveAt_System_Int32_">RemoveAt(int)</a>
        </td>
        <td class="markdown level1 summary"><p>Removes a named style (NamedStyle object) from the collection at the specified index.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Win_Spread_NamedStyleCollection_Serialize_System_Xml_XmlTextWriter_" data-uid="FarPoint.Win.Spread.NamedStyleCollection.Serialize(System.Xml.XmlTextWriter)">
          <a class="xref" href="FarPoint.Win.Spread.NamedStyleCollection.Serialize.html#FarPoint_Win_Spread_NamedStyleCollection_Serialize_System_Xml_XmlTextWriter_">Serialize(XmlTextWriter)</a>
        </td>
        <td class="markdown level1 summary"><p>Saves the object to XML.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="events">Events
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="FarPoint_Win_Spread_NamedStyleCollection_Changed" data-uid="FarPoint.Win.Spread.NamedStyleCollection.Changed">
          <a class="xref" href="FarPoint.Win.Spread.NamedStyleCollection.Changed.html">Changed</a>
        </td>
        <td class="markdown level1 summary"><p>Occurs when a style is added, removed, or changed in the collection.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
