ListView.StateImageList 属性

获取或设置与控件中应用程序定义的状态相关的 ImageList

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

语法

声明
Public Property StateImageList As ImageList
用法
Dim instance As ListView
Dim value As ImageList

value = instance.StateImageList

instance.StateImageList = value
public ImageList StateImageList { get; set; }
public:
property ImageList^ StateImageList {
    ImageList^ get ();
    void set (ImageList^ value);
}
/** @property */
public ImageList get_StateImageList ()

/** @property */
public void set_StateImageList (ImageList value)
public function get StateImageList () : ImageList

public function set StateImageList (value : ImageList)

属性值

ImageList,包含一组状态图像,这些图像可用于指示项的应用程序定义的状态。默认为 空引用(在 Visual Basic 中为 Nothing)。

备注

StateImageList 属性允许您指定 ImageList,它包含了用于表示 ListView 控件中项的应用程序特定状态的图像。状态图像显示在项的图标左侧。您可以使用状态图像(例如选中和未选中的复选框),指示应用程序定义的项状态。在 ListView 控件的所有视图中都可以看到状态图像。

如果在 StateImageList 属性中指定了 ImageList,并且 CheckBoxes 属性设置为 true,则显示位于 ImageList 中索引位置 0 和 1 处的图像,而不是复选框。显示位于索引位置 0 处的图像代替处于未选中状态的复选框,显示位于索引位置 1 处的图像代替处于选中状态的复选框。

平台

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

请参见

参考

ListView 类
ListView 成员
System.Windows.Forms 命名空间
ImageList 类
ListView.LargeImageList 属性
ListView.SmallImageList 属性
ListView.CheckBoxes 属性