Beispiel #1
0
        /// <summary>
        /// Return the icon associated with the current extension
        /// </summary>
        /// <param name="width">Size of the icon</param>
        /// <returns>The extension icon, as Bitmap</returns>
        private Bitmap ExtensionSystemIcon(uint width)
        {
            IconManager.IImageListSize size =
                width <= 16 ? IconManager.IImageListSize.SHIL_SMALL :
                width <= 32 ? IconManager.IImageListSize.SHIL_LARGE :
                width <= 48 ? IconManager.IImageListSize.SHIL_EXTRALARGE :
                IconManager.IImageListSize.SHIL_JUMBO;

            BitmapSource icon = IconManager.GetFileIcon(extension, size, false);

            return(IconManager.BitmapSourceToBitmap(icon));
        }