/// <summary> /// Retrieves the Icon for the absolute PIDL as an ImageSource /// </summary> /// <param name="pidl">The PIDL to query the Icon for.</param> /// <param name="size">0 = 32px, 1 = 16px, 2 = 48px</param> /// <returns>The icon as an ImageSource, otherwise a default image.</returns> public static ImageSource GetImageFromAssociatedIcon(IntPtr pidl, IconSize size) { IntPtr hIcon = IconHelper.GetIconByPidl(pidl, size); return(GetImageFromHIcon(hIcon)); }
/// <summary> /// Retrieves the Icon for the file name as an ImageSource /// </summary> /// <param name="filename">The filename of the file to query the Icon for.</param> /// <param name="size">0 = 32px, 1 = 16px, 2 = 48px</param> /// <returns>The icon as an ImageSource, otherwise a default image.</returns> public static ImageSource GetImageFromAssociatedIcon(string filename, IconSize size) { IntPtr hIcon = IconHelper.GetIconByFilename(filename, size); return(GetImageFromHIcon(hIcon)); }