# IIcon interface

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 interface IIcon
```

Base interface for icons and other UI images. This type does *not* wrap bitmaps, but instead represents scale-agnostic, relatively small images of either vector, pixel or algorithmic contents.

**Derived types:** [AbstractIcon](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.icon.abstracticon.md)

## Properties

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

## Methods

- [Draw](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.icon.iicon/draw.md): Render this icon into a graphics context.
- [DrawToBitmap](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.icon.iicon/drawtobitmap.md): Render the icon to a bitmap.
- [FindState](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.icon.iicon/findstate.md): Find the icon state with the specified name.
- [MoveState](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.icon.iicon/movestate.md): Move a named state to a new value over time.
- [SetState](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.icon.iicon/setstate.md): Set the value of a named state immediately.
