ImageList Property

TabControl.ImageList Property

Gets or sets the images to display on the control's tabs.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public ImageList ImageList { get; set; }

Property Value

Type: System.Windows.Forms.ImageList
An ImageList that specifies the images to display on the tabs.

To display an image on a tab, set the ImageIndex property of that TabPage. The ImageIndex acts as the index into the ImageList.

The following code example creates a TabControl with one TabPage. This example uses the ImageList property to display images, from the collection defined by the ImageList named myImages, on the tabs of tabControl1.

Use the System.Drawing, System.ComponentModel, System.Windows.Forms, and System.Resources namespaces for this example.

using System.Drawing;
using System.ComponentModel;
using System.Windows.Forms;
using System.Resources;

public class Form1 : Form
    public Form1()
        IContainer components = new Container();
        ResourceManager resources = new ResourceManager(typeof(Form1));
        TabControl tabControl1 = new TabControl();
        TabPage tabPage1 = new TabPage();

        // Declares and instantiates the ImageList object.
        ImageList myImages = new ImageList(components);

        // Sets the images in myImages to display on the tabs of tabControl1. 
        tabControl1.ImageList = myImages;

        tabPage1.ImageIndex = 0;
        tabPage1.Text = "tabPage1";

        // Gets the handle that provides the data of myImages.
        myImages.ImageStream = ((ImageListStreamer)(resources.GetObject("myImages.ImageStream")));

        // Sets properties of myImages. 
        myImages.ColorDepth = ColorDepth.Depth8Bit;
        myImages.ImageSize = new Size(16, 16);
        myImages.TransparentColor = Color.Transparent;


    static void Main() 
        Application.Run(new Form1());

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

© 2015 Microsoft