ListViewItem.ImageList 属性

获取 ImageList,它包含与该项一起显示的图像。

**命名空间:**System.Windows.Forms
**程序集:**System.Windows.Forms(在 system.windows.forms.dll 中)

语法

声明
Public ReadOnly Property ImageList As ImageList
用法
Dim instance As ListViewItem
Dim value As ImageList

value = instance.ImageList
public ImageList ImageList { get; }
public:
property ImageList^ ImageList {
    ImageList^ get ();
}
/** @property */
public ImageList get_ImageList ()
public function get ImageList () : ImageList

属性值

ListView 控件使用的 ImageList,它包含与该项一起显示的图像。

备注

根据与该项关联的 ListView 控件的 View 属性的当前值,由该项使用的 ImageList 可以是在 ListView 控件的 LargeImageList 属性或 SmallImageList 属性中指定的一个。如果 View 属性设置为 LargeIcon,则使用在 LargeImageList 属性中指定的 ImageList;否则,使用在 SmallImageList 属性中指定的 ImageList。您可以使用此属性确定哪个 ImageList 控件在为该项提供图像。要在包含为该项显示的图像的 ImageList 中确定索引位置,请使用 ImageIndex 属性。

平台

Windows 98、Windows 2000 SP4、Windows CE、Windows Millennium Edition、Windows Mobile for Pocket PC、Windows Mobile for Smartphone、Windows Server 2003、Windows XP Media Center Edition、Windows XP Professional x64 Edition、Windows XP SP2、Windows XP Starter Edition

.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求

版本信息

.NET Framework

受以下版本支持:2.0、1.1、1.0

请参见

参考

ListViewItem 类
ListViewItem 成员
System.Windows.Forms 命名空间
ListViewItem.ImageIndex 属性