Table of Contents

Class StockIcon

Namespace
Microsoft.WindowsAPICodePack.Shell
Assembly
Microsoft.WindowsAPICodePack.Shell.dll

Represents a standard system icon.

public class StockIcon : IDisposable
Inheritance
StockIcon
Implements
Inherited Members

Constructors

StockIcon(StockIconIdentifier)

Creates a new StockIcon instance with the specified identifer, default size and no link overlay or selected states.

public StockIcon(StockIconIdentifier id)

Parameters

id StockIconIdentifier

A value that identifies the icon represented by this instance.

StockIcon(StockIconIdentifier, StockIconSize, bool, bool)

Creates a new StockIcon instance with the specified identifer and options.

public StockIcon(StockIconIdentifier id, StockIconSize size, bool isLinkOverlay, bool isSelected)

Parameters

id StockIconIdentifier

A value that identifies the icon represented by this instance.

size StockIconSize

A value that indicates the size of the stock icon.

isLinkOverlay bool

A bool value that indicates whether the icon has a link overlay.

isSelected bool

A bool value that indicates whether the icon is in a selected state.

Properties

Bitmap

Gets the icon image in System.Drawing.Bitmap format.

public Bitmap Bitmap { get; }

Property Value

Bitmap

BitmapSource

Gets the icon image in System.Windows.Media.Imaging.BitmapSource format.

public BitmapSource BitmapSource { get; }

Property Value

BitmapSource

CurrentSize

Gets or sets a value that controls the size of the Stock Icon.

public StockIconSize CurrentSize { get; set; }

Property Value

StockIconSize

A StockIconSize value.

Icon

Gets the icon image in System.Drawing.Icon format.

public Icon Icon { get; }

Property Value

Icon

Identifier

Gets or sets the Stock Icon identifier associated with this icon.

public StockIconIdentifier Identifier { get; set; }

Property Value

StockIconIdentifier

LinkOverlay

Gets or sets a value that cotrols whether to put a link overlay on the icon.

public bool LinkOverlay { get; set; }

Property Value

bool

A bool value.

Selected

Gets or sets a value indicating whether the icon appears selected.

public bool Selected { get; set; }

Property Value

bool

A bool value.

Methods

Dispose()

Release the native objects

public void Dispose()

Dispose(bool)

Release the native and managed objects

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

Indicates that this is being called from Dispose(), rather than the finalizer.

~StockIcon()

protected ~StockIcon()