Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Gets or sets the URL to an overlay icon for this item.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
Syntax
'Declaration
Public Property IconOverlay As String
Get
Set
'Usage
Dim instance As SPListItem
Dim value As String
value = instance.IconOverlay
instance.IconOverlay = value
public string IconOverlay { get; set; }
Property Value
Type: System.String
A string that contains the URL relative to the Template/Images directory.
Remarks
An icon overlay is a small image that can be used to represent an item in a list view.
Examples
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("https://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();
}
}
}