[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Drawing.IBackgroundPictures.Item

this Property

this[int]

Gets the IBackgroundPicture at the specified index in this collection.

Use the index parameter to retrieve a background picture by its position in the IBackgroundPictures collection.

Declaration
IBackgroundPicture this[int index] { get; }
ReadOnly Default Property Item(index As Integer) As IBackgroundPicture
Parameters
Type Name Description
int index

The zero-based index of the background picture in the collection.

Examples
IBackgroundPictures backgroundPictures = worksheet.BackgroundPictures;
int count = backgroundPictures.Count;
if (count > 0)
{
    IBackgroundPicture picture = backgroundPictures[0];
}

this[string]

Gets the IBackgroundPicture with the specified name from this collection.

Use this indexer to retrieve an IBackgroundPicture from the current IBackgroundPictures collection by its name.

Declaration
IBackgroundPicture this[string name] { get; }
ReadOnly Default Property Item(name As String) As IBackgroundPicture
Parameters
Type Name Description
string name

Required string. The name for the object.

Examples
IBackgroundPictures backgroundPictures = worksheet.BackgroundPictures;
using (MemoryStream stream = CreateSampleImageStream())
{
    backgroundPictures.AddPicture(stream, ImageType.PNG, 12, 18, 120, 80).Name = "Logo";
}
IBackgroundPicture picture = backgroundPictures["Logo"];