# C1.WPF.Extended.ColorPalette

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_WPF_Extended_ColorPalette" data-uid="C1.WPF.Extended.ColorPalette" class="text-break">ColorPalette Class
</h1>
  <div class="markdown level0 summary"><p>Class that defines named groups of colors.</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">ColorPalette</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a class="xref" href="C1.WPF.Extended.ColorPaletteEntry.html">ColorPaletteEntry</a>&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.ienumerable">IEnumerable</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.WPF.Extended.html">C1.WPF.Extended</a></h6>
  <h6><strong>Assembly</strong>: C1.WPF.Extended.4.6.2.dll</h6>
  <h5 id="C1_WPF_Extended_ColorPalette_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public sealed class ColorPalette : IEnumerable&lt;ColorPaletteEntry&gt;, IEnumerable</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public NotInheritable Class ColorPalette
    Implements IEnumerable(Of ColorPaletteEntry), IEnumerable</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_WPF_Extended_ColorPalette__ctor_System_String_" data-uid="C1.WPF.Extended.ColorPalette.#ctor(System.String)">
          <a class="xref" href="C1.WPF.Extended.ColorPalette.-ctor.html#C1_WPF_Extended_ColorPalette__ctor_System_String_">ColorPalette(string)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates an instance of the color palette with the specified theme name.</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="C1_WPF_Extended_ColorPalette_Count" data-uid="C1.WPF.Extended.ColorPalette.Count">
          <a class="xref" href="C1.WPF.Extended.ColorPalette.Count.html#C1_WPF_Extended_ColorPalette_Count">Count</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the number of palette entries.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Extended_ColorPalette_Item_System_Int32_" data-uid="C1.WPF.Extended.ColorPalette.Item(System.Int32)">
          <a class="xref" href="C1.WPF.Extended.ColorPalette.Item.html#C1_WPF_Extended_ColorPalette_Item_System_Int32_">this[int]</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the palette entry with the specified index.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Extended_ColorPalette_ThemeName" data-uid="C1.WPF.Extended.ColorPalette.ThemeName">
          <a class="xref" href="C1.WPF.Extended.ColorPalette.ThemeName.html#C1_WPF_Extended_ColorPalette_ThemeName">ThemeName</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the name of the color theme.</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="C1_WPF_Extended_ColorPalette_Add_System_Windows_Media_Color_" data-uid="C1.WPF.Extended.ColorPalette.Add(System.Windows.Media.Color)">
          <a class="xref" href="C1.WPF.Extended.ColorPalette.Add.html#C1_WPF_Extended_ColorPalette_Add_System_Windows_Media_Color_">Add(Color)</a>
        </td>
        <td class="markdown level1 summary"><p>Adds the specified color to the palette.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Extended_ColorPalette_Add_System_Windows_Media_Color_System_String_" data-uid="C1.WPF.Extended.ColorPalette.Add(System.Windows.Media.Color,System.String)">
          <a class="xref" href="C1.WPF.Extended.ColorPalette.Add.html#C1_WPF_Extended_ColorPalette_Add_System_Windows_Media_Color_System_String_">Add(Color, string)</a>
        </td>
        <td class="markdown level1 summary"><p>Adds the color with the specified name.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Extended_ColorPalette_Add_System_Windows_Media_Color_System_String_System_String_" data-uid="C1.WPF.Extended.ColorPalette.Add(System.Windows.Media.Color,System.String,System.String)">
          <a class="xref" href="C1.WPF.Extended.ColorPalette.Add.html#C1_WPF_Extended_ColorPalette_Add_System_Windows_Media_Color_System_String_System_String_">Add(Color, string, string)</a>
        </td>
        <td class="markdown level1 summary"><p>Adds the color with the specified name and description.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Extended_ColorPalette_Clear" data-uid="C1.WPF.Extended.ColorPalette.Clear">
          <a class="xref" href="C1.WPF.Extended.ColorPalette.Clear.html#C1_WPF_Extended_ColorPalette_Clear">Clear()</a>
        </td>
        <td class="markdown level1 summary"><p>Deletes all entries from the palette.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Extended_ColorPalette_Clone_System_String_" data-uid="C1.WPF.Extended.ColorPalette.Clone(System.String)">
          <a class="xref" href="C1.WPF.Extended.ColorPalette.Clone.html#C1_WPF_Extended_ColorPalette_Clone_System_String_">Clone(string)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns a clone of this palette with the specified theme name.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Extended_ColorPalette_Contains_System_Windows_Media_Color_" data-uid="C1.WPF.Extended.ColorPalette.Contains(System.Windows.Media.Color)">
          <a class="xref" href="C1.WPF.Extended.ColorPalette.Contains.html#C1_WPF_Extended_ColorPalette_Contains_System_Windows_Media_Color_">Contains(Color)</a>
        </td>
        <td class="markdown level1 summary"><p>Determines whether a color is in the palette.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Extended_ColorPalette_GetColorPalette_C1_WPF_Extended_Office2007ColorTheme_" data-uid="C1.WPF.Extended.ColorPalette.GetColorPalette(C1.WPF.Extended.Office2007ColorTheme)">
          <a class="xref" href="C1.WPF.Extended.ColorPalette.GetColorPalette.html#C1_WPF_Extended_ColorPalette_GetColorPalette_C1_WPF_Extended_Office2007ColorTheme_">GetColorPalette(Office2007ColorTheme)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns one of the predefined color palettes.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Extended_ColorPalette_IndexOf_System_Windows_Media_Color_" data-uid="C1.WPF.Extended.ColorPalette.IndexOf(System.Windows.Media.Color)">
          <a class="xref" href="C1.WPF.Extended.ColorPalette.IndexOf.html#C1_WPF_Extended_ColorPalette_IndexOf_System_Windows_Media_Color_">IndexOf(Color)</a>
        </td>
        <td class="markdown level1 summary"><p>Searches for the specified color in the palette and returns a zero-based index of the found entry.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Extended_ColorPalette_Set_System_Int32_System_Windows_Media_Color_" data-uid="C1.WPF.Extended.ColorPalette.Set(System.Int32,System.Windows.Media.Color)">
          <a class="xref" href="C1.WPF.Extended.ColorPalette.Set.html#C1_WPF_Extended_ColorPalette_Set_System_Int32_System_Windows_Media_Color_">Set(int, Color)</a>
        </td>
        <td class="markdown level1 summary"><p>Assigns the color to the palette entry with the specified index.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Extended_ColorPalette_Set_System_Int32_System_Windows_Media_Color_System_String_" data-uid="C1.WPF.Extended.ColorPalette.Set(System.Int32,System.Windows.Media.Color,System.String)">
          <a class="xref" href="C1.WPF.Extended.ColorPalette.Set.html#C1_WPF_Extended_ColorPalette_Set_System_Int32_System_Windows_Media_Color_System_String_">Set(int, Color, string)</a>
        </td>
        <td class="markdown level1 summary"><p>Assigns the color and color name to the palette entry with the specified index.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
