SPListItem.IconOverlay property

Gets or sets the URL to an overlay icon for this item.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

'Declaration
Public Property IconOverlay As String
	Get
	Set
'Usage
Dim instance As SPListItem
Dim value As String

value = instance.IconOverlay

instance.IconOverlay = value

Property value

Type: System.String
A string that contains the URL relative to the Template/Images directory.

An icon overlay is a small image that can be used to represent an item in a list view.

The following example is a console application that sets the IconOverlay property for the first item in the Announcements list of a Web site.

using System;
using Microsoft.SharePoint;

namespace Test
{
    class Program
    {
        static void Main(string[] args)
        {
            using (SPSite site = new SPSite("http://localhost"))
            {
                using (SPWeb web = site.OpenWeb())
                {
                    SPList list = web.GetList("/lists/announcements");
                    if (list.ItemCount > 0)
                    {
                        SPListItem item = list.Items[0];
                        item.IconOverlay = "announce.gif";
                        item.Update();
                        Console.WriteLine(item.IconOverlay);
                    }
                }
            }
            Console.ReadLine();
        }
    }
}

Show: