Click or drag to resize

Icon Class

Represents an icon which allows for multiple sizes and resolutions of an image
Inheritance Hierarchy

Namespace:  Eto.Drawing
Assembly:  Eto (in Eto.dll) Version: 2.5.3-dev
Syntax
public class Icon : Image

The Icon type exposes the following members.

Constructors
  NameDescription
Public methodIcon(Stream)
Initializes a new instance of the Icon class with the contents of the specified stream
Public methodIcon(String)
Intitializes a new instanc of the Icon class with the contents of the specified fileName
Public methodIcon(IconIHandler)
Initializes a new instance of the Icon class with the specified handler
Public methodIcon(IconFrame)
Initializes a new instance of the Icon class with the specified frames.
Public methodIcon(IEnumerableIconFrame)
Initializes a new instance of the Icon class with the specified frames.
Public methodIcon(Single, Bitmap)
Initializes a new instance of the Icon class with the specified bitmap.
Top
Properties
  NameDescription
Public propertyFrames
Gets the definition for each frame in this icon.
Top
Methods
  NameDescription
Public methodStatic memberFromResource(String, Assembly)
Loads an icon from an embedded resource of the specified assembly
Public methodStatic memberFromResource(String, Type)
Loads an icon from a resource in the same assembly as the specified type
Public methodGetFrame
Gets the frame with the specified scale that can fit into the fittingSize if specified.
Public methodWithSize(Size)
Gets a copy of this Icon with frames scaled to draw within the specified fitting size.
Public methodWithSize(Int32, Int32)
Gets a copy of this Icon with frames scaled to draw within the specified fitting size.
Top
Remarks
The formats supported vary by platform, however all platforms do support loading windows .ico format. Using an icon for things like menus, toolbars, etc are preferred so that each platform can use the appropriate sized image. For High DPI/Retina displays (e.g. on OS X), this will allow using a higher resolution image automatically.
See Also