# AbstractIcon class

Namespace: [Grasshopper2.UI.Icon](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.ui.icon.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public abstract class AbstractIcon : IIcon
```

Abstract implementation of IIcon. Consider deriving from this base class rather than implementing IIcon from scratch. This class also has many static creation methods for creating IIcon instances from a variety of data.

**Derived types:** [PixelIcon](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.icon.pixelicon.md), [StandardIcons.Progress](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.icon.standardicons.progress.md), [StandardIcons.UndoRedoIcon](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.icon.standardicons.undoredoicon.md), [ValueIcon](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.toolbar.valueicon.md), [VectorIcon](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.icon.vector.vectoricon.md)

## Constructors

- [AbstractIcon](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.icon.abstracticon/ctor.md): Abstract base class constructor.

## Properties

- [States](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.icon.abstracticon/states.md): Enumerate over all state names.
- [Type](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.icon.abstracticon/type.md): Gets the type of icon.

## Methods

- [AddState](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.icon.abstracticon/addstate.md): Add a state to this icon. This method ought to be called from the constructor of derived types only.
- [Draw](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.icon.abstracticon/draw.md): Render this icon into a graphics context.
- [DrawDropShadow](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.icon.abstracticon/drawdropshadow.md): Create a bitmap containing the drop shadow of this icon.
- [DrawInternal](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.icon.abstracticon/drawinternal.md): Render the icon.
- [DrawToBitmap](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.icon.abstracticon/drawtobitmap.md): Render the icon to a bitmap.
- [FindState](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.icon.abstracticon/findstate.md): Find the icon state with the specified name.
- [FromBitmap](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.icon.abstracticon/frombitmap.md): (static) Create an image from an Eto bitmap.
- [FromFile](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.icon.abstracticon/fromfile.md): (static) Create an icon from a grasshopper icon file (*.ghicon).
- [FromResource](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.icon.abstracticon/fromresource.md): (3 overloads, static) Create an icon from named, embedded resources in the supplied assembly.
- [FromStream](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.icon.abstracticon/fromstream.md): (static) Create an icon from a stream of data. The stream must contain data written by a [IStorable](https://developer.rhino3d.com/api/gh2/type/grasshopperio.istorable.md) type. VectorIcon is but one example of such a type.
- [HandleStateChange](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.icon.abstracticon/handlestatechange.md): Override this method if you need to respond to state changes as they happen.
- [MoveState](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.icon.abstracticon/movestate.md): Move a named state to a new value over time.
- [SetState](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.icon.abstracticon/setstate.md): Set the value of a named state immediately.
