# C1.Framework.IconElement

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_Framework_IconElement" data-uid="C1.Framework.IconElement" class="text-break">IconElement Class
</h1>
  <div class="markdown level0 summary"><p>Represents a visual icon that can be tinted and resized.</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="C1.Framework.Element.html">Element</a></div>
    <div class="level2"><span class="xref">IconElement</span></div>
      <div class="level3"><a class="xref" href="C1.Framework.BitmapIconElement.html">BitmapIconElement</a></div>
      <div class="level3"><a class="xref" href="C1.Framework.CompositeIconElement.html">CompositeIconElement</a></div>
      <div class="level3"><a class="xref" href="C1.Framework.FontIconElement.html">FontIconElement</a></div>
      <div class="level3"><a class="xref" href="C1.Framework.VectorIconElement.html">VectorIconElement</a></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="C1.Win.Accessibility.ISupportUia.html">ISupportUia</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.Framework.html">C1.Framework</a></h6>
  <h6><strong>Assembly</strong>: C1.Win.10.dll</h6>
  <h5 id="C1_Framework_IconElement_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public abstract class IconElement : Element, ISupportUia</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public MustInherit Class IconElement
    Inherits Element
    Implements ISupportUia</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_Framework_IconElement__ctor" data-uid="C1.Framework.IconElement.#ctor">
          <a class="xref" href="C1.Framework.IconElement.-ctor.html#C1_Framework_IconElement__ctor">IconElement()</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Framework.IconElement.html">IconElement</a> class.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_IconElement__ctor_C1_Framework_C1Icon_" data-uid="C1.Framework.IconElement.#ctor(C1.Framework.C1Icon)">
          <a class="xref" href="C1.Framework.IconElement.-ctor.html#C1_Framework_IconElement__ctor_C1_Framework_C1Icon_">IconElement(C1Icon)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Framework.IconElement.html">IconElement</a> class.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_IconElement__ctor_C1_Framework_C1Icon_C1_Framework_Style_" data-uid="C1.Framework.IconElement.#ctor(C1.Framework.C1Icon,C1.Framework.Style)">
          <a class="xref" href="C1.Framework.IconElement.-ctor.html#C1_Framework_IconElement__ctor_C1_Framework_C1Icon_C1_Framework_Style_">IconElement(C1Icon, Style)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Framework.IconElement.html">IconElement</a> class.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_IconElement__ctor_System_String_" data-uid="C1.Framework.IconElement.#ctor(System.String)">
          <a class="xref" href="C1.Framework.IconElement.-ctor.html#C1_Framework_IconElement__ctor_System_String_">IconElement(string)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Framework.IconElement.html">IconElement</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="C1_Framework_IconElement_DEFAULT_HEIGHT" data-uid="C1.Framework.IconElement.DEFAULT_HEIGHT">
          <a class="xref" href="C1.Framework.IconElement.DEFAULT_HEIGHT.html">DEFAULT_HEIGHT</a>
        </td>
        <td class="markdown level1 summary"><p>The default height of an icon.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_IconElement_DEFAULT_WIDTH" data-uid="C1.Framework.IconElement.DEFAULT_WIDTH">
          <a class="xref" href="C1.Framework.IconElement.DEFAULT_WIDTH.html">DEFAULT_WIDTH</a>
        </td>
        <td class="markdown level1 summary"><p>The default width of an icon.</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_Framework_IconElement_BackColor" data-uid="C1.Framework.IconElement.BackColor">
          <a class="xref" href="C1.Framework.IconElement.BackColor.html#C1_Framework_IconElement_BackColor">BackColor</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the color used to paint the icon's background.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_IconElement_Color" data-uid="C1.Framework.IconElement.Color">
          <a class="xref" href="C1.Framework.IconElement.Color.html#C1_Framework_IconElement_Color">Color</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the color used to paint the icon.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_IconElement_IsIconDirty" data-uid="C1.Framework.IconElement.IsIconDirty">
          <a class="xref" href="C1.Framework.IconElement.IsIconDirty.html#C1_Framework_IconElement_IsIconDirty">IsIconDirty</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a value indicating whether the icon cache needs to be regenerated.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_IconElement_Key" data-uid="C1.Framework.IconElement.Key">
          <a class="xref" href="C1.Framework.IconElement.Key.html#C1_Framework_IconElement_Key">Key</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the key used to retrieve the image.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_IconElement_Padding" data-uid="C1.Framework.IconElement.Padding">
          <a class="xref" href="C1.Framework.IconElement.Padding.html#C1_Framework_IconElement_Padding">Padding</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the padding of the icon.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_IconElement_RenderBox" data-uid="C1.Framework.IconElement.RenderBox">
          <a class="xref" href="C1.Framework.IconElement.RenderBox.html#C1_Framework_IconElement_RenderBox">RenderBox</a>
        </td>
        <td class="markdown level1 summary"><p>Returns rectangle (in the icon coordinates) to render icon.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_IconElement_ShouldDispose" data-uid="C1.Framework.IconElement.ShouldDispose">
          <a class="xref" href="C1.Framework.IconElement.ShouldDispose.html#C1_Framework_IconElement_ShouldDispose">ShouldDispose</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a value indicating whether the cached icon image should be disposed when no longer needed.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_IconElement_ShouldRasterize" data-uid="C1.Framework.IconElement.ShouldRasterize">
          <a class="xref" href="C1.Framework.IconElement.ShouldRasterize.html#C1_Framework_IconElement_ShouldRasterize">ShouldRasterize</a>
        </td>
        <td class="markdown level1 summary"><p>Determines whether icon needs bitmap cache for drawing.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_IconElement_ShouldResize" data-uid="C1.Framework.IconElement.ShouldResize">
          <a class="xref" href="C1.Framework.IconElement.ShouldResize.html#C1_Framework_IconElement_ShouldResize">ShouldResize</a>
        </td>
        <td class="markdown level1 summary"><p>Determines whether icon image should be resized according to the C1Icon element size.</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_Framework_IconElement_CreateElement_C1_Framework_C1Icon_" data-uid="C1.Framework.IconElement.CreateElement(C1.Framework.C1Icon)">
          <a class="xref" href="C1.Framework.IconElement.CreateElement.html#C1_Framework_IconElement_CreateElement_C1_Framework_C1Icon_">CreateElement(C1Icon)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates the <a class="xref" href="C1.Framework.IconElement.html">IconElement</a> to show the <a class="xref" href="C1.Framework.C1Icon.html">C1Icon</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_IconElement_CreateElement_C1_Framework_C1Icon_C1_Framework_Style_" data-uid="C1.Framework.IconElement.CreateElement(C1.Framework.C1Icon,C1.Framework.Style)">
          <a class="xref" href="C1.Framework.IconElement.CreateElement.html#C1_Framework_IconElement_CreateElement_C1_Framework_C1Icon_C1_Framework_Style_">CreateElement(C1Icon, Style)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates the <a class="xref" href="C1.Framework.IconElement.html">IconElement</a> to show the <a class="xref" href="C1.Framework.C1Icon.html">C1Icon</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_IconElement_FinalizeUI" data-uid="C1.Framework.IconElement.FinalizeUI">
          <a class="xref" href="C1.Framework.IconElement.FinalizeUI.html#C1_Framework_IconElement_FinalizeUI">FinalizeUI()</a>
        </td>
        <td class="markdown level1 summary"><p>Finalizes the user interface. This method is called when element is removed from UI.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_IconElement_GetImage_System_Drawing_Image__System_Int32_System_Int32_" data-uid="C1.Framework.IconElement.GetImage(System.Drawing.Image@,System.Int32,System.Int32)">
          <a class="xref" href="C1.Framework.IconElement.GetImage.html#C1_Framework_IconElement_GetImage_System_Drawing_Image__System_Int32_System_Int32_">GetImage(ref Image, int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the image represented by this <a class="xref" href="C1.Framework.C1Icon.html">C1Icon</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_IconElement_InitializeUI" data-uid="C1.Framework.IconElement.InitializeUI">
          <a class="xref" href="C1.Framework.IconElement.InitializeUI.html#C1_Framework_IconElement_InitializeUI">InitializeUI()</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes the UI.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_IconElement_Layout_System_Drawing_Graphics_" data-uid="C1.Framework.IconElement.Layout(System.Drawing.Graphics)">
          <a class="xref" href="C1.Framework.IconElement.Layout.html#C1_Framework_IconElement_Layout_System_Drawing_Graphics_">Layout(Graphics)</a>
        </td>
        <td class="markdown level1 summary"><p>Layout this element based on its style and contents.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_IconElement_OnIconChanged_C1_Framework_C1Icon_System_ComponentModel_PropertyChangedEventArgs_" data-uid="C1.Framework.IconElement.OnIconChanged(C1.Framework.C1Icon,System.ComponentModel.PropertyChangedEventArgs)">
          <a class="xref" href="C1.Framework.IconElement.OnIconChanged.html#C1_Framework_IconElement_OnIconChanged_C1_Framework_C1Icon_System_ComponentModel_PropertyChangedEventArgs_">OnIconChanged(C1Icon, PropertyChangedEventArgs)</a>
        </td>
        <td class="markdown level1 summary"><p>Updates element properties on icon property changes.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_IconElement_RenderContent_System_Drawing_Graphics_System_Drawing_Rectangle_" data-uid="C1.Framework.IconElement.RenderContent(System.Drawing.Graphics,System.Drawing.Rectangle)">
          <a class="xref" href="C1.Framework.IconElement.RenderContent.html#C1_Framework_IconElement_RenderContent_System_Drawing_Graphics_System_Drawing_Rectangle_">RenderContent(Graphics, Rectangle)</a>
        </td>
        <td class="markdown level1 summary"><p>Renders the element contents into the specified <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a> object at the specified location.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_IconElement_RenderIcon_C1_Framework_Style_System_Drawing_Graphics_System_Drawing_Rectangle_" data-uid="C1.Framework.IconElement.RenderIcon(C1.Framework.Style,System.Drawing.Graphics,System.Drawing.Rectangle)">
          <a class="xref" href="C1.Framework.IconElement.RenderIcon.html#C1_Framework_IconElement_RenderIcon_C1_Framework_Style_System_Drawing_Graphics_System_Drawing_Rectangle_">RenderIcon(Style, Graphics, Rectangle)</a>
        </td>
        <td class="markdown level1 summary"><p>Renders the icon to the specified graphics surface within the given rectangle.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_IconElement_RescaleConstantsForDpi_System_Int32_System_Int32_" data-uid="C1.Framework.IconElement.RescaleConstantsForDpi(System.Int32,System.Int32)">
          <a class="xref" href="C1.Framework.IconElement.RescaleConstantsForDpi.html#C1_Framework_IconElement_RescaleConstantsForDpi_System_Int32_System_Int32_">RescaleConstantsForDpi(int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Provides constants for rescaling the control when a DPI change occurs.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_IconElement_SetIconDirty_System_Boolean_" data-uid="C1.Framework.IconElement.SetIconDirty(System.Boolean)">
          <a class="xref" href="C1.Framework.IconElement.SetIconDirty.html#C1_Framework_IconElement_SetIconDirty_System_Boolean_">SetIconDirty(bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Notifies C1Icon element that UI should be re-initialized for the next drawing operation.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_IconElement_ToString" data-uid="C1.Framework.IconElement.ToString">
          <a class="xref" href="C1.Framework.IconElement.ToString.html#C1_Framework_IconElement_ToString">ToString()</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a string representation of this <a class="xref" href="C1.Framework.C1BitmapIcon.html">C1BitmapIcon</a>.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
