Table of Contents

Class ImageSet

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

ImageSet can be used for specifying several size representations of the same picture.

[TypeConverter(typeof(ImageSetConverter))]
public class ImageSet : ImageContainer<IImageSetHandler>, IBaseObject, IDisposableObject, INotifyPropertyChanged, IImageContainer, IDisposable
Inheritance
ImageSet
Implements

Constructors

ImageSet()

Initializes a new instance of the ImageSet with default values.

ImageSet(IImageSetHandler)

Initializes a new instance of the ImageSet class.

ImageSet(Image)

Initializes a new instance of the ImageSet with Image.

ImageSet(bool)

Initializes a new instance of the ImageSet with default values.

ImageSet(Stream)

Initializes a new instance of the ImageSet class from the specified data stream.

ImageSet(string?, Uri?)

Initializes a new instance of the ImageSet class from the specified file or resource url.

Fields

Empty

Gets an empty ImageSet.

Properties

DefaultSize

Get the size of the bitmap represented by this bundle in default resolution or, equivalently, at 100% scaling.

IsReadOnly

Gets whether object is readonly.

Methods

AsImage()

Gets first image with size equal to DefaultSize.

AsImage(SizeI)

Gets first image.

AsImageFor(Control)

Get bitmap of the size appropriate for the DPI scaling used by the given control.

CreateHandler()

Creates handler.

FromImage(Image?)

Creates ImageSet instance from the Image instance.

FromImageGrayScale(Image?)

Creates grayscaled ImageSet instance from the Image instance.

FromSvgStream(Stream, SizeI, Color?, Color?)

Initializes a tuple with two instances of the ImageSet class from the specified Stream which contains svg data.

FromSvgStream(Stream, int, int, Color?)

Initializes a new instance of the ImageSet class from the specified Stream which contains svg data.

FromSvgString(string, int, int, Color?)

Initializes a new instance of the ImageSet class from the specified string which contains svg data.

FromSvgUrl(string, int, int, Color?)

Initializes a new instance of the ImageSet class from the specified url which points to svg file or resource.

FromUrl(string)

Initializes a new instance of the ImageSet class from the specified url.

FromUrlOrNull(string)

Initializes a new instance of the ImageSet class from the specified url.

GetPreferredBitmapSizeAtScale(double)

Get the size that would be best to use for this ImageSet at the given DPI scaling factor.

GetPreferredBitmapSizeFor(Control)

Get the size that would be best to use for this ImageSet at the DPI scaling factor used by the given control.

Operators

explicit operator ImageSet(Image)

Converts the specified Image to a ImageSet.