Support
Joined: 18 Jul 2005 Posts: 731
|
Posted: Wed Apr 25, 2007 3:35 am Post subject: HOWTO: Display system default icons/system imagelist icons for items in your namespace extension |
|
|
To displays system default icons/system imagelist icons for items in your namespace extension, set the e.IconExtractMode to IconExtractMode.SystemImageListIndexFromPath or IconExtractMode.SystemImageListIndexSpecified in the NSEItem.GetIconFileAndIndex method.
If you use IconExtractMode.SystemImageListIndexSpecified, you can further use Utils.GetSystemIconIndexFromExtension or Utils.GetSystemIconIndexFromPath to retrieve and retrieve the index of an icon within the system imagelist and set e.IconIndex to this value.
If you use IconExtractMode.SystemImageListIndexFromPath ,set the e.IconFile property to the full path of a file/folder; the icon displayed for the item will be the same as the icon shown by Windows Explorer for that file/folder.
The documentation for the respective APIs provide more information on this topic. The FileSystemBrowser sample that comes with EZNamespaceExtensions.Net also demonstrates this technique. |
|