LEADTOOLS For .NET Class Library Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.28
ImageList Appearance

The ImageList class has several built-in views that control how the items in the control are displayed. These views are contained in the ImageListItemStyle enumeration which is used with the ItemStyle property.

The following figures show the various properties that control how the ImageList views its items.

Normal View Style

Use the normal view style by setting the ItemStyle property of the ImageList class to ImageListItemStyle.Normal.

The following figure shows how the various item style properties affect how the items are displayed:

Legend Description
1 ImageList.ItemSize
2 ItemImageSize
3 ImageList.ItemForeground. Used to draw the text of un-selected items
4 ImageList.ItemBackground. Used to fill the background of un-selected items
5 ImageList.ItemSelectedForeground. Used to draw the text of selected items
6 ImageList.ItemSelectedBackground. Used to fill the background of selected items
Button View Style

Use the button view style by setting the ItemStyle property of the ImageList class to ImageListItemStyle.Button.

The following figure shows how the various item style properties affect how the items are displayed:

Legend Description
1 ImageList.ItemSize
2 ItemImageSize
3 ImageList.ItemMargin
4 ImageList.ItemForeground. Used to draw the text of all items (selected and un-selected)

The following are not used with ImageListItemStyle.Button:

Explorer View Style

Use the explorer view style by setting the ItemStyle property of the ImageList class to ImageListItemStyle.Explorer.

The following figure shows how the various item style properties affect how the items are displayed:

Legend Description
1 ImageList.ItemSize
2 ItemImageSize
3 ImageList.ItemMargin
4 ImageList.ItemForeground. Used to draw the text of un-selected items
5 ImageList.ItemSelectedForeground. Used to draw the text of selected items as well as a rectangle around the image of selected items
6 ImageList.ItemSelectedBackground. When an item is selected, this color is used to fill the background behind the text of the item and to draw a rectangle around the image

The following are not used with ImageListItemStyle.Explorer:

Owner-Draw View Style

Use the owner-draw view style by setting the ItemStyle property of the ImageList class to ImageListItemStyle.UserStyle.