Click or drag to resize

ShellTreeViewEmptyIconIndex Property

Gets the zero-based index of the empty icon.

Namespace:  Jam.Shell
Assembly:  ShellBrowser (in ShellBrowser.dll) Version: 7.1
Syntax
public int EmptyIconIndex { get; }

Property Value

Type: Int32
The empty icon index.
Examples
You can use the EmptyIconIndex to clear icon from selectively from the ShellTreeView.
C#
private void ShellTreeView1_AddTreeNodeCustomIcons(object sender, AddTreeNodeEventArgs e)
{
    if (e.Node.AbsoluteItemIdList.SpecialFolder == ShellFolder.MyMusic)
        e.Node.ImageIndex = e.Node.SelectedImageIndex = shellTreeView1.ImageList.Images.IndexOfKey("folder_music.png");

    //the following code clears the image of all root nodes in the ShellTree
    if (e.ParentNode == null)
    {
        e.Node.ImageIndex = shellTreeView1.EmptyIconIndex;
    }
}
See Also