Table of Contents

Class ImageSet

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

ImageSet contains the same Image with different sizes.

[TypeConverter(typeof(ImageSetConverter))]
public class ImageSet : ImageContainer<IImageSetHandler>, IBaseObjectWithAttr, IBaseObjectWithId, INotifyPropertyChanged, IImmutableObject, IDisposableObject, IBaseObject, 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.

UseSkiaSharpForLoading

Gets or sets a value indicating whether to use SkiaSharp for loading images. Default is True. If this value is False, platform specific image loading will be used.

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(AbstractControl)

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 grayscale 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(AbstractControl)

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

InternalLoadFromStream(Stream)

Loads image data from the specified stream.

Operators

explicit operator ImageSet(Image)

Converts the specified Image to a ImageSet.