# C1.Framework.BitmapIconElement

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_Framework_BitmapIconElement" data-uid="C1.Framework.BitmapIconElement" class="text-break">BitmapIconElement Class
</h1>
  <div class="markdown level0 summary"><p>Represents an icon created from an image.</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"><a class="xref" href="C1.Framework.IconElement.html">IconElement</a></div>
    <div class="level3"><span class="xref">BitmapIconElement</span></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_BitmapIconElement_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class BitmapIconElement : IconElement, ISupportUia</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class BitmapIconElement
    Inherits IconElement
    Implements ISupportUia</code></pre>
  </div>
  <h5 id="C1_Framework_BitmapIconElement_remarks"><strong>Remarks</strong></h5>
  <div class="markdown level0 remarks"><p>The file that you use should be a solid image on a transparent background.
The bitmap image is expected to be a true bitmap that has transparent pixels and non-transparent pixels.
The recommended format is PNG. Other file-format image sources will load but result in a solid block of the foreground color.
<b>Caution:</b> Resizing bitmaps at runtime might hurt application performance and result in blurry images. Consider using fixed-size images where possible.</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="C1_Framework_BitmapIconElement__ctor" data-uid="C1.Framework.BitmapIconElement.#ctor">
          <a class="xref" href="C1.Framework.BitmapIconElement.-ctor.html#C1_Framework_BitmapIconElement__ctor">BitmapIconElement()</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Framework.BitmapIconElement.html">BitmapIconElement</a> class.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_BitmapIconElement__ctor_C1_Framework_C1BitmapIcon_" data-uid="C1.Framework.BitmapIconElement.#ctor(C1.Framework.C1BitmapIcon)">
          <a class="xref" href="C1.Framework.BitmapIconElement.-ctor.html#C1_Framework_BitmapIconElement__ctor_C1_Framework_C1BitmapIcon_">BitmapIconElement(C1BitmapIcon)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Framework.BitmapIconElement.html">BitmapIconElement</a> class.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_BitmapIconElement__ctor_C1_Framework_C1BitmapIcon_C1_Framework_Style_" data-uid="C1.Framework.BitmapIconElement.#ctor(C1.Framework.C1BitmapIcon,C1.Framework.Style)">
          <a class="xref" href="C1.Framework.BitmapIconElement.-ctor.html#C1_Framework_BitmapIconElement__ctor_C1_Framework_C1BitmapIcon_C1_Framework_Style_">BitmapIconElement(C1BitmapIcon, Style)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Framework.BitmapIconElement.html">BitmapIconElement</a> class.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_BitmapIconElement__ctor_System_String_" data-uid="C1.Framework.BitmapIconElement.#ctor(System.String)">
          <a class="xref" href="C1.Framework.BitmapIconElement.-ctor.html#C1_Framework_BitmapIconElement__ctor_System_String_">BitmapIconElement(string)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Framework.BitmapIconElement.html">BitmapIconElement</a> class.</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_BitmapIconElement_ShouldResize" data-uid="C1.Framework.BitmapIconElement.ShouldResize">
          <a class="xref" href="C1.Framework.BitmapIconElement.ShouldResize.html#C1_Framework_BitmapIconElement_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>
      <tr>
        <td id="C1_Framework_BitmapIconElement_ShowAsMonochrome" data-uid="C1.Framework.BitmapIconElement.ShowAsMonochrome">
          <a class="xref" href="C1.Framework.BitmapIconElement.ShowAsMonochrome.html#C1_Framework_BitmapIconElement_ShowAsMonochrome">ShowAsMonochrome</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a value that indicates whether the bitmap is shown in a single color.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_BitmapIconElement_Source" data-uid="C1.Framework.BitmapIconElement.Source">
          <a class="xref" href="C1.Framework.BitmapIconElement.Source.html#C1_Framework_BitmapIconElement_Source">Source</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the image source.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_BitmapIconElement_Stretch" data-uid="C1.Framework.BitmapIconElement.Stretch">
          <a class="xref" href="C1.Framework.BitmapIconElement.Stretch.html#C1_Framework_BitmapIconElement_Stretch">Stretch</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a <a class="xref" href="C1.Framework.BitmapIconElement.Stretch.html#C1_Framework_BitmapIconElement_Stretch">Stretch</a> enumeration value that describes how the shape fills its allocated space.</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_BitmapIconElement_GetImage_System_Drawing_Image__System_Int32_System_Int32_" data-uid="C1.Framework.BitmapIconElement.GetImage(System.Drawing.Image@,System.Int32,System.Int32)">
          <a class="xref" href="C1.Framework.BitmapIconElement.GetImage.html#C1_Framework_BitmapIconElement_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_BitmapIconElement_InitializeUI" data-uid="C1.Framework.BitmapIconElement.InitializeUI">
          <a class="xref" href="C1.Framework.BitmapIconElement.InitializeUI.html#C1_Framework_BitmapIconElement_InitializeUI">InitializeUI()</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes the UI.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Framework_BitmapIconElement_OnIconChanged_C1_Framework_C1Icon_System_ComponentModel_PropertyChangedEventArgs_" data-uid="C1.Framework.BitmapIconElement.OnIconChanged(C1.Framework.C1Icon,System.ComponentModel.PropertyChangedEventArgs)">
          <a class="xref" href="C1.Framework.BitmapIconElement.OnIconChanged.html#C1_Framework_BitmapIconElement_OnIconChanged_C1_Framework_C1Icon_System_ComponentModel_PropertyChangedEventArgs_">OnIconChanged(C1Icon, PropertyChangedEventArgs)</a>
        </td>
        <td class="markdown level1 summary"><p>Updates element pproperties on icon property changes.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
