Share via


ImageLibrary Class

Definition

public ref class ImageLibrary : Microsoft::VisualStudio::PlatformUI::DisposableObject
[Windows::Foundation::Metadata::WebHostHidden]
class ImageLibrary : Microsoft::VisualStudio::PlatformUI::DisposableObject
[System.Runtime.InteropServices.Guid("8fa80f44-0b82-4a81-9264-ca9e36fa70e4")]
public class ImageLibrary : Microsoft.VisualStudio.PlatformUI.DisposableObject
[<System.Runtime.InteropServices.Guid("8fa80f44-0b82-4a81-9264-ca9e36fa70e4")>]
type ImageLibrary = class
    inherit DisposableObject
Public Class ImageLibrary
Inherits DisposableObject
Inheritance
ImageLibrary
Attributes

Constructors

ImageLibrary(Boolean, ITracer)

Initializes a new instance of an ImageLibrary object.

ImageLibrary(JoinableTaskFactory, Boolean, ITracer)

Constructs an ImageLibrary object

Fields

BeforeImageRealized

Raised before an image is realized from it source.

DefaultGrayscaleBiasColor

The default color for biasing grayscale images (#40FFFFFF). This produces a 75% translucent effect.

HighContrastGrayscaleBiasColor

The color for biasing grayscale images when in high-contrast mode.

InvalidImageMoniker

The invalid image moniker. Images using this moniker cannot be loaded from an image manifest.

NeutralSize

The size to use when specifying a size-neutral image in a call to AddCustomImage. The size-neutral image is the image that is scaled to the requested size when an image of the requested size is not available.

UnknownSize

The invalid image size. When an image source has invalid size, it means this source has a size but is not loaded yet.

Properties

AlternateDebugColor

The alternate color of the border rendered in debug mode

CachedImageCount

The number of images that are being stored in the image cache.

DebugColor

The color of the border rendered in debug mode

DebugMode

Whether or not images should be rendered in debug mode, which adds a colored border.

Default

The default instance of ImageLibrary

Initialized

Indicates whether the library is ready to use.

IsCaching

Indicates whether the library is caching its contents

IsDisposed

Returns whether the object has been disposed once, protects against double disposal

(Inherited from DisposableObject)
Tracer

The tracer for the library.

UseAsyncCrispImageConverter

Whether or not to use the CrispImage converter asynchronously.

Methods

AddCustomCompositeImage(Int16Size, ImageCompositionLayer[])

Creates a custom image which is composed of multiple other images, and adds that image to the library.

AddCustomImage(IEnumerable<String>, Boolean)
AddCustomImage(ImageSource, Boolean)

Adds a custom image to the library, directly via an already-created ImageSource.

AddCustomImageList(ImageMoniker[])

Adds a custom image list to the library

AddMonikerFormattingDescriptor(String, Guid, Func<IReadOnlyDictionary<Int32,String>>)

Adds a formatting descriptor for ImageMoniker.ToString().

Deserialize(JoinableTaskFactory, Stream, Boolean, ITracer, IStreamStorage<String>)

Deserializes an image library from stream

Deserialize(JoinableTaskFactory, Stream, Boolean, ITracer)

Deserializes an image library from stream

Deserialize(Stream, Boolean, ITracer, IStreamStorage<String>)

Deserializes an image library from stream.

Dispose()

Disposes the current object then suppresses further finalization.

(Inherited from DisposableObject)
Dispose(Boolean)

Standard virtual overload for IDisposable pattern

(Inherited from DisposableObject)
DisposeManagedResources()

Disposes the managed resources.

DisposeNativeResources()

Allows derived classes to provide custom dispose handling for native resources

(Inherited from DisposableObject)
GetCacheSize(Int64, Int64)

Get the number bytes are actually used by the cache.

GetImage(ImageMoniker, ImageAttributes)

Returns an image conforming to attributes from the library

GetImageCount()

The total number of images in the library. Determining the count may be expensive for custom images, which are stored weakly.

GetImageListCount()

The total number of image lists in the library. Determining the count may be expensive for custom images, which are stored weakly.

GetImageListMonikers()

The monikers of all of the image lists in the library.

GetImageListMonikers(ImageMoniker)

Returns a collection of ImageMonikers of the images in a given image list.

GetImageMonikers()

The monikers of all of the images in the library.

GetImageMonikerType(ImageMoniker)

Returns whether the ImageMoniker was added as a custom image, loaded from manifest, or neither, meaning we don't have an image with that moniker.

Load(IEnumerable<String>, Boolean, ITracer, IStreamStorage<String>)

Loads an ImageLibrary from a collection of manifests.

Load(JoinableTaskFactory, IEnumerable<String>, Boolean, Boolean, ITracer)

Loads an ImageLibrary from a collection of manifests

Load(JoinableTaskFactory, IEnumerable<String>, Boolean, ITracer, IStreamStorage<String>)

Loads an ImageLibrary from a collection of manifests

Load(JoinableTaskFactory, IEnumerable<String>, Boolean, ITracer)

Loads an ImageLibrary from a collection of manifests

Load(JoinableTaskFactory, String, Boolean, Boolean, ITracer)

Loads an ImageLibrary from a manifest

Load(JoinableTaskFactory, String, Boolean, ITracer, IStreamStorage<String>)

Loads an ImageLibrary from a manifest

Load(JoinableTaskFactory, String, Boolean, ITracer)

Loads an ImageLibrary from a manifest

Load(String, Boolean, ITracer, IStreamStorage<String>)

Loads an ImageLibrary from a manifest.

RemoveCustomImage(IImageHandle)

Removes a custom image from the library. The image must have been added by AddCustomImage.

RemoveCustomImageList(IImageHandle)

Removes a custom image list from the library. The image must have been added by AddCustomImageList.

ResetFormattingDescriptors()

Resets all of the formatting descriptors for ImageMoniker.ToString();

Serialize(Stream)

Serializes the image library to stream

ThrowIfDisposed()

Throws an ObjectDisposedException if this object has been disposed

(Inherited from DisposableObject)
TryGetMonikerForExtension(String, Boolean, ImageMoniker)

Attempts to get the moniker for the image to use for files whose extension matches extension. If we haven't already identified the image to use, we'll attempt to identify it using the DefaultIcon property of the registered ProgID for the extension.

TryGetMonikerForProgId(String, Boolean, ImageMoniker)

Attempts to get the moniker for the image to use for files matching progId. If we haven't already identified the image to use, we'll attempt to identify it using the DefaultIcon property of progId.

Events

BuildLibraryCache

Raised when the library cache is built.

Disposing

Raised when the event is being disposed, while it is still accessible.

(Inherited from DisposableObject)
ImageLibraryCreated

Raised when the ImageLibrary is created.

ImageLibraryDisposed

Raised when the ImageLibrary is disposed.

InitializedChanged

Raised when the library is done initializing.

ProcessManifest

Raised when there is a process manifest.

Applies to