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
StockIconIdentifierA 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
StockIconIdentifierA value that identifies the icon represented by this instance.
size
StockIconSizeA value that indicates the size of the stock icon.
isLinkOverlay
boolA bool value that indicates whether the icon has a link overlay.
isSelected
boolA 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
LinkOverlay
Gets or sets a value that cotrols whether to put a link overlay on the icon.
public bool LinkOverlay { get; set; }
Property Value
Selected
Gets or sets a value indicating whether the icon appears selected.
public bool Selected { get; set; }
Property 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
boolIndicates that this is being called from Dispose(), rather than the finalizer.
~StockIcon()
protected ~StockIcon()