Class ShellIcon
- Namespace
- ExControls
- Assembly
- ExControls.dll
Represents a Windows icon, which is a small bitmap image that is used to represent an object. Icons can be thought of as transparent bitmaps, although their size is determined by the system.
public sealed class ShellIcon : IDisposable
- Inheritance
-
ShellIcon
- Implements
- Inherited Members
Constructors
ShellIcon(ShellIconType, ShellIconSize, bool, bool, bool)
Initializes a new instance of the ShellIcon class and loads the system stock icon of the specified type and size.
public ShellIcon(ShellIconType type, ShellIconSize size = ShellIconSize.Normal, bool selected = false, bool linkOverlay = false, bool useShellIconSize = false)
Parameters
typeShellIconTypeType of the ShellIcon.
sizeShellIconSizeSize of the ShellIcon.
selectedboolSelected style of the icon.
linkOverlayboolLink overlay of the icon.
useShellIconSizeboolUse shell size of the icon instead of the system size metrics.
Properties
Disposed
Gets whether this instance was disposed.
public bool Disposed { get; }
Property Value
Handle
Gets a Handle of the ShellIcon.
public nint Handle { get; }
Property Value
Index
Gets an index of this icon in system's internal ImageList.
public int Index { get; }
Property Value
LinkOverlay
Modifies the ShellIcon value by causing the function to add the link overlay to the file's icon.
public bool LinkOverlay { get; }
Property Value
Selected
Modifies the ShellIcon by causing the function to blend the icon with the system highlight color.
public bool Selected { get; }
Property Value
Size
Size of the ShellIcon.
public ShellIconSize Size { get; }
Property Value
Type
Gets the type of ShellIcon.
public ShellIconType Type { get; }
Property Value
UseShellIconSize
Modifies the Size of ShellIcon by causing the function to retrieve the Shell-sized icons rather than the sizes specified by the system metrics.
public bool UseShellIconSize { get; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
~ShellIcon()
protected ~ShellIcon()
ToBitmap()
public Bitmap ToBitmap()
Returns
- Bitmap
a new bitmap with the icon
Operators
implicit operator Icon(ShellIcon)
Converts ShellIcon to Icon that uses the same handle (it stays valid only until the ShellIcon is disposed).
public static implicit operator Icon(ShellIcon icon)
Parameters
iconShellIconthe shell icon
Returns
- Icon
icon with the handle of
icon