Closed GoogleCodeExporter closed 9 years ago
To have a workaround I've created the following extension methods/type for the
missing methods and types:
------------------------------------
namespace MyNamespace
{
using System;
using System.Drawing;
using System.Reflection;
using Manina.Windows.Forms;
public static class ImageListViewItemExtensions
{
public static Image GetCachedImage(this ImageListViewItem item, CachedImageType imageType)
{
var enumType = item.GetType().Assembly.GetType(@"Manina.Windows.Forms.CachedImageType");
var realType = Enum.ToObject(enumType, (int) imageType);
return
item.GetType().InvokeMember(
@"GetCachedImage",
BindingFlags.Public | BindingFlags.NonPublic |
BindingFlags.Instance | BindingFlags.InvokeMethod,
null,
item,
new[] {realType}) as Image;
}
public static string GetSubItemText(this ImageListViewItem item, ColumnType type)
{
return
item.GetType().InvokeMember(
@"GetSubItemText",
BindingFlags.Public | BindingFlags.NonPublic |
BindingFlags.Instance | BindingFlags.InvokeMethod,
null,
item,
new object[] {type}) as string;
}
}
public enum CachedImageType
{
Thumbnail,
SmallIcon,
LargeIcon,
}
}
------------------------------------
Maybe this helps someone to get started with the same issue.
Original comment by uwe.k...@gmail.com
on 6 Nov 2013 at 8:54
This issue was closed by revision r703.
Original comment by oozcitak
on 25 Aug 2014 at 4:03
Original issue reported on code.google.com by
uwe.k...@gmail.com
on 6 Nov 2013 at 8:18