次の方法で共有


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 は、LargeImageList プロパティまたは ListView コントロールの 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 プロパティ