Class PdfListItemCollection
- Namespace
- Syncfusion.Pdf.Lists
- Assembly
- Syncfusion.Pdf.Portable.dll
Represents collection of list items.
public class PdfListItemCollection : PdfCollection, IEnumerable
- Inheritance
-
PdfListItemCollection
- Implements
- Inherited Members
Examples
//Create a new PDf document
PdfDocument document = new PdfDocument();
//Creates a new page and adds it as the last page of the document
PdfPage page = document.Pages.Add();
PdfGraphics graphics = page.Graphics;
string[] products = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" };
// Creates an item collection
PdfListItemCollection listItemCollection = new PdfListItemCollection(products);
//Create a unordered list
PdfUnorderedList list = new PdfUnorderedList(listItemCollection);
//Set the marker style
list.Marker.Style = PdfUnorderedMarkerStyle.Disk;
list.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
document.Save("List.pdf");
'Create a new PDf document
Dim document As PdfDocument = New PdfDocument()
'Create a page
Dim page As PdfPage = document.Pages.Add()
Dim graphics As PdfGraphics = page.Graphics
Dim products() As String = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" }
' Creates an item collection
Dim listItemCollection As PdfListItemCollection = New PdfListItemCollection(products)
'Create a unordered list
Dim list As PdfUnorderedList = New PdfUnorderedList(listItemCollection)
'Set the marker style
list.Marker.Style = PdfUnorderedMarkerStyle.Disk
list.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
document.Save("List.pdf")
Constructors
PdfListItemCollection()
Initializes a new instance of the PdfListItemCollection class.
public PdfListItemCollection()
Examples
//Create a new instance of PdfDocument class.
PdfDocument document = new PdfDocument();
//Add a new page to the document.
PdfPage page = document.Pages.Add();
//Get the PDF page graphics.
PdfGraphics graphics = page.Graphics;
SizeF size = page.Graphics.ClientSize;
//Create font
PdfFont font = new PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Italic);
//Create string format
PdfStringFormat format = new PdfStringFormat();
format.LineSpacing = 10f;
//Create a PDF unordered list.
//Create new list items.
PdfListItemCollection collection = new PdfListItemCollection();
collection.Add("PDF");
collection.Add("XlsIO");
collection.Add("DocIO");
collection.Add("PPT");
PdfUnorderedList list = new PdfUnorderedList(collection);
list.Marker.Style = PdfUnorderedMarkerStyle.Disk;
//Set line indent.
list.Indent = 20;
//Set font
list.Font = font;
//Set string format.
list.StringFormat = format;
//Draw the PDF list to page.
list.Draw(page, new RectangleF(0, 20, size.Width, size.Height));
//Save and close the document.
document.Save("Output.pdf");
document.Close(true);
'Create a new instance of PdfDocument class.
Dim document As New PdfDocument()
'Add a new page to the document.
Dim page As PdfPage = document.Pages.Add()
'Get the PDF page graphics.
Dim graphics As PdfGraphics = page.Graphics
Dim size As SizeF = page.Graphics.ClientSize
'Create font
Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Italic)
'Create string format
Dim format As New PdfStringFormat()
format.LineSpacing = 10F
'Create new list items.
Dim collection As PdfListItemCollection = New PdfListItemCollection()
collection.Add("PDF")
collection.Add("XlsIO")
collection.Add("DocIO")
collection.Add("PPT")
'Create a PDF unordered list.
Dim list As New PdfUnorderedList(collection)
list.Marker.Style = PdfUnorderedMarkerStyle.Disk
'Set line indent.
list.Indent = 20
'Set font
list.Font = font
'Set string format.
list.StringFormat = format
'Draw the PDF list to page.
list.Draw(page, New RectangleF(0, 20, size.Width, size.Height))
'Save and close the document.
document.Save("Output.pdf")
document.Close(True)
- See Also
PdfListItemCollection(string[])
Initializes a new instance of the PdfListItemCollection class.
public PdfListItemCollection(string[] items)
Parameters
items
string[]A string array that contains items separated by the new line character.
Examples
//Create a new PDf document
PdfDocument document = new PdfDocument();
//Creates a new page and adds it as the last page of the document
PdfPage page = document.Pages.Add();
PdfGraphics graphics = page.Graphics;
string[] products = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" };
// Creates an item collection
PdfListItemCollection listItemCollection = new PdfListItemCollection(products);
//Create a unordered list
PdfUnorderedList list = new PdfUnorderedList(listItemCollection);
//Set the marker style
list.Marker.Style = PdfUnorderedMarkerStyle.Disk;
list.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
document.Save("List.pdf");
'Create a new PDf document
Dim document As PdfDocument = New PdfDocument()
'Create a page
Dim page As PdfPage = document.Pages.Add()
Dim graphics As PdfGraphics = page.Graphics
Dim products() As String = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" }
' Creates an item collection
Dim listItemCollection As PdfListItemCollection = New PdfListItemCollection(products)
'Create a unordered list
Dim list As PdfUnorderedList = New PdfUnorderedList(listItemCollection)
'Set the marker style
list.Marker.Style = PdfUnorderedMarkerStyle.Disk
list.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
document.Save("List.pdf")
- See Also
Properties
this[int]
Gets the PdfListItem from collection at the specified index.
public PdfListItem this[int index] { get; }
Parameters
index
int
Property Value
Examples
//Create a new PDf document
PdfDocument document = new PdfDocument();
//Creates a new page and adds it as the last page of the document
PdfPage page = document.Pages.Add();
PdfGraphics graphics = page.Graphics;
string[] products = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" };
// Creates an item collection
PdfListItemCollection listItemCollection = new PdfListItemCollection(products);
//Create a unordered list
PdfUnorderedList list = new PdfUnorderedList(listItemCollection);
//Set the marker style
list.Marker.Style = PdfUnorderedMarkerStyle.Disk;
list.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
document.Save("List.pdf");
'Create a new PDf document
Dim document As PdfDocument = New PdfDocument()
'Create a page
Dim page As PdfPage = document.Pages.Add()
Dim graphics As PdfGraphics = page.Graphics
Dim products() As String = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" }
' Creates an item collection
Dim listItemCollection As PdfListItemCollection = New PdfListItemCollection(products)
'Create a unordered list
Dim list As PdfUnorderedList = New PdfUnorderedList(listItemCollection)
'Set the marker style
list.Marker.Style = PdfUnorderedMarkerStyle.Disk
list.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
document.Save("List.pdf")
- See Also
Methods
Add(PdfListItem)
Adds the specified item.
public int Add(PdfListItem item)
Parameters
item
PdfListItemThe item.
Returns
- int
The item index in collection.
Examples
// Creates an item collection
PdfListItemCollection listItemCollection = new PdfListItemCollection();
// Creates an item
PdfListItem item = new PdfListItem("Backoffice");
item.TextIndent = 10;
item.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 12);
// Creates Grid list item
PdfListItem gridItem = new PdfListItem("Grid");
gridItem.Brush = PdfBrushes.BlueViolet;
gridItem.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 12);
// Adding items in collection
listItemCollection.Add(item);
listItemCollection.Add(gridItem);
' Creates an item collection
Dim listItemCollection As PdfListItemCollection = New PdfListItemCollection()
' Creates an item
Dim item As PdfListItem = New PdfListItem("Backoffice")
item.TextIndent = 10
item.Font = New PdfStandardFont(PdfFontFamily.TimesRoman, 12)
' Creates Grid list item
Dim gridItem As PdfListItem = New PdfListItem("Grid")
gridItem.Brush = PdfBrushes.BlueViolet
gridItem.Font = New PdfStandardFont(PdfFontFamily.TimesRoman, 12)
' Adding items in collection
listItemCollection.Add(item)
listItemCollection.Add(gridItem)
- See Also
Add(PdfListItem, float)
Adds the specified item.
public int Add(PdfListItem item, float itemIndent)
Parameters
item
PdfListItemThe item.
itemIndent
floatThe item indent.
Returns
Examples
// Creates an item collection
PdfListItemCollection listItemCollection = new PdfListItemCollection();
// Creates an item
PdfListItem item = new PdfListItem("Backoffice");
item.TextIndent = 10;
item.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 12);
// Creates Grid list item
PdfListItem gridItem = new PdfListItem("Grid");
gridItem.Brush = PdfBrushes.BlueViolet;
gridItem.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 12);
// Adding items in collection
listItemCollection.Add(item, 10);
listItemCollection.Add(gridItem, 10);
' Creates an item collection
Dim listItemCollection As PdfListItemCollection = New PdfListItemCollection()
' Creates an item
Dim item As PdfListItem = New PdfListItem("Backoffice")
item.TextIndent = 10
item.Font = New PdfStandardFont(PdfFontFamily.TimesRoman, 12)
' Creates Grid list item
Dim gridItem As PdfListItem = New PdfListItem("Grid")
gridItem.Brush = PdfBrushes.BlueViolet
gridItem.Font = New PdfStandardFont(PdfFontFamily.TimesRoman, 12)
' Adding items in collection
listItemCollection.Add(item, 10)
listItemCollection.Add(gridItem, 10)
- See Also
Add(string)
Adds the item with a specified text.
public PdfListItem Add(string text)
Parameters
text
stringThe text.
Returns
Examples
//Create a new instance of PdfDocument class.
PdfDocument document = new PdfDocument();
//Add a new page to the document.
PdfPage page = document.Pages.Add();
//Get the PDF page graphics.
PdfGraphics graphics = page.Graphics;
SizeF size = page.Graphics.ClientSize;
//Create font
PdfFont font = new PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Italic);
//Create string format
PdfStringFormat format = new PdfStringFormat();
format.LineSpacing = 10f;
//Create a PDF unordered list.
//Create new list items.
PdfListItemCollection collection = new PdfListItemCollection();
collection.Add("PDF");
collection.Add("XlsIO");
collection.Add("DocIO");
collection.Add("PPT");
PdfUnorderedList list = new PdfUnorderedList(collection);
list.Marker.Style = PdfUnorderedMarkerStyle.Disk;
//Set line indent.
list.Indent = 20;
//Set font
list.Font = font;
//Set string format.
list.StringFormat = format;
//Draw the PDF list to page.
list.Draw(page, new RectangleF(0, 20, size.Width, size.Height));
//Save and close the document.
document.Save("Output.pdf");
document.Close(true);
'Create a new instance of PdfDocument class.
Dim document As New PdfDocument()
'Add a new page to the document.
Dim page As PdfPage = document.Pages.Add()
'Get the PDF page graphics.
Dim graphics As PdfGraphics = page.Graphics
Dim size As SizeF = page.Graphics.ClientSize
'Create font
Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Italic)
'Create string format
Dim format As New PdfStringFormat()
format.LineSpacing = 10F
'Create new list items.
Dim collection As PdfListItemCollection = New PdfListItemCollection()
collection.Add("PDF")
collection.Add("XlsIO")
collection.Add("DocIO")
collection.Add("PPT")
'Create a PDF unordered list.
Dim list As New PdfUnorderedList(collection)
list.Marker.Style = PdfUnorderedMarkerStyle.Disk
'Set line indent.
list.Indent = 20
'Set font
list.Font = font
'Set string format.
list.StringFormat = format
'Draw the PDF list to page.
list.Draw(page, New RectangleF(0, 20, size.Width, size.Height))
'Save and close the document.
document.Save("Output.pdf")
document.Close(True)
- See Also
Add(string, PdfFont)
Adds the specified text.
public PdfListItem Add(string text, PdfFont font)
Parameters
Returns
- PdfListItem
The item index in collection.
Examples
//Create a new instance of PdfDocument class.
PdfDocument document = new PdfDocument();
//Add a new page to the document.
PdfPage page = document.Pages.Add();
//Get the PDF page graphics.
PdfGraphics graphics = page.Graphics;
SizeF size = page.Graphics.ClientSize;
//Create font
PdfFont font = new PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Italic);
//Create string format
PdfStringFormat format = new PdfStringFormat();
format.LineSpacing = 10f;
//Create a PDF unordered list.
//Create new list items.
PdfListItemCollection collection = new PdfListItemCollection();
collection.Add("PDF", font);
collection.Add("XlsIO", font);
collection.Add("DocIO", font);
collection.Add("PPT", font);
PdfUnorderedList list = new PdfUnorderedList(collection);
list.Marker.Style = PdfUnorderedMarkerStyle.Disk;
//Set line indent.
list.Indent = 20;
//Set font
list.Font = font;
//Set string format.
list.StringFormat = format;
//Draw the PDF list to page.
list.Draw(page, new RectangleF(0, 20, size.Width, size.Height));
//Save and close the document.
document.Save("Output.pdf");
document.Close(true);
'Create a new instance of PdfDocument class.
Dim document As New PdfDocument()
'Add a new page to the document.
Dim page As PdfPage = document.Pages.Add()
'Get the PDF page graphics.
Dim graphics As PdfGraphics = page.Graphics
Dim size As SizeF = page.Graphics.ClientSize
'Create font
Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Italic)
'Create string format
Dim format As New PdfStringFormat()
format.LineSpacing = 10F
'Create new list items.
Dim collection As PdfListItemCollection = New PdfListItemCollection()
collection.Add("PDF", font)
collection.Add("XlsIO", font)
collection.Add("DocIO", font)
collection.Add("PPT", font)
'Create a PDF unordered list.
Dim list As New PdfUnorderedList(collection)
list.Marker.Style = PdfUnorderedMarkerStyle.Disk
'Set line indent.
list.Indent = 20
'Set font
list.Font = font
'Set string format.
list.StringFormat = format
'Draw the PDF list to page.
list.Draw(page, New RectangleF(0, 20, size.Width, size.Height))
'Save and close the document.
document.Save("Output.pdf")
document.Close(True)
- See Also
Add(string, PdfFont, float)
Adds the specified text.
public PdfListItem Add(string text, PdfFont font, float itemIndent)
Parameters
Returns
- PdfListItem
List item.
Examples
//Create a new instance of PdfDocument class.
PdfDocument document = new PdfDocument();
//Add a new page to the document.
PdfPage page = document.Pages.Add();
//Get the PDF page graphics.
PdfGraphics graphics = page.Graphics;
SizeF size = page.Graphics.ClientSize;
//Create font
PdfFont font = new PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Italic);
//Create string format
PdfStringFormat format = new PdfStringFormat();
format.LineSpacing = 10f;
//Create a PDF unordered list.
//Create new list items.
PdfListItemCollection collection = new PdfListItemCollection();
collection.Add("PDF", font, 10);
collection.Add("XlsIO", font, 10);
collection.Add("DocIO", font, 10);
collection.Add("PPT", font, 10);
PdfUnorderedList list = new PdfUnorderedList(collection);
list.Marker.Style = PdfUnorderedMarkerStyle.Disk;
//Set line indent.
list.Indent = 20;
//Set font
list.Font = font;
//Set string format.
list.StringFormat = format;
//Draw the PDF list to page.
list.Draw(page, new RectangleF(0, 20, size.Width, size.Height));
//Save and close the document.
document.Save("Output.pdf");
document.Close(true);
'Create a new instance of PdfDocument class.
Dim document As New PdfDocument()
'Add a new page to the document.
Dim page As PdfPage = document.Pages.Add()
'Get the PDF page graphics.
Dim graphics As PdfGraphics = page.Graphics
Dim size As SizeF = page.Graphics.ClientSize
'Create font
Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Italic)
'Create string format
Dim format As New PdfStringFormat()
format.LineSpacing = 10F
'Create new list items.
Dim collection As PdfListItemCollection = New PdfListItemCollection()
collection.Add("PDF", font, 10)
collection.Add("XlsIO", font, 10)
collection.Add("DocIO", font, 10)
collection.Add("PPT", font, 10)
'Create a PDF unordered list.
Dim list As New PdfUnorderedList(collection)
list.Marker.Style = PdfUnorderedMarkerStyle.Disk
'Set line indent.
list.Indent = 20
'Set font
list.Font = font
'Set string format.
list.StringFormat = format
'Draw the PDF list to page.
list.Draw(page, New RectangleF(0, 20, size.Width, size.Height))
'Save and close the document.
document.Save("Output.pdf")
document.Close(True)
- See Also
Add(string, float)
Adds the specified text.
public PdfListItem Add(string text, float itemIndent)
Parameters
Returns
- PdfListItem
List item.
Examples
//Create a new instance of PdfDocument class.
PdfDocument document = new PdfDocument();
//Add a new page to the document.
PdfPage page = document.Pages.Add();
//Get the PDF page graphics.
PdfGraphics graphics = page.Graphics;
SizeF size = page.Graphics.ClientSize;
//Create font
PdfFont font = new PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Italic);
//Create string format
PdfStringFormat format = new PdfStringFormat();
format.LineSpacing = 10f;
//Create a PDF unordered list.
//Create new list items.
PdfListItemCollection collection = new PdfListItemCollection();
collection.Add("PDF", 10);
collection.Add("XlsIO", 10);
collection.Add("DocIO",10);
collection.Add("PPT", 10);
PdfUnorderedList list = new PdfUnorderedList(collection);
list.Marker.Style = PdfUnorderedMarkerStyle.Disk;
//Set line indent.
list.Indent = 20;
//Set font
list.Font = font;
//Set string format.
list.StringFormat = format;
//Draw the PDF list to page.
list.Draw(page, new RectangleF(0, 20, size.Width, size.Height));
//Save and close the document.
document.Save("Output.pdf");
document.Close(true);
'Create a new instance of PdfDocument class.
Dim document As New PdfDocument()
'Add a new page to the document.
Dim page As PdfPage = document.Pages.Add()
'Get the PDF page graphics.
Dim graphics As PdfGraphics = page.Graphics
Dim size As SizeF = page.Graphics.ClientSize
'Create font
Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Italic)
'Create string format
Dim format As New PdfStringFormat()
format.LineSpacing = 10F
'Create new list items.
Dim collection As PdfListItemCollection = New PdfListItemCollection()
collection.Add("PDF", 10)
collection.Add("XlsIO", 10)
collection.Add("DocIO", 10)
collection.Add("PPT", 10)
'Create a PDF unordered list.
Dim list As New PdfUnorderedList(collection)
list.Marker.Style = PdfUnorderedMarkerStyle.Disk
'Set line indent.
list.Indent = 20
'Set font
list.Font = font
'Set string format.
list.StringFormat = format
'Draw the PDF list to page.
list.Draw(page, New RectangleF(0, 20, size.Width, size.Height))
'Save and close the document.
document.Save("Output.pdf")
document.Close(True)
- See Also
Clear()
Clears collection.
public void Clear()
Examples
string[] products = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" };
// Creates an item collection
PdfListItemCollection listItemCollection = new PdfListItemCollection(products);
// Clears the list
listItemCollection.Clear();
Dim products() As String = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" }
' Creates an item collection
Dim listItemCollection As PdfListItemCollection = New PdfListItemCollection(products)
' Clears the list
listItemCollection.Clear()
- See Also
IndexOf(PdfListItem)
Determines the index of a specific item in the list.
public int IndexOf(PdfListItem item)
Parameters
item
PdfListItemThe item to locate in the list.
Returns
- int
The index of item if found in the list; otherwise, -1.
Examples
string[] products = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" };
// Creates an item collection
PdfListItemCollection listItemCollection = new PdfListItemCollection(products);
// Creates 'Tools' list item
PdfListItem toolsItem = new PdfListItem("Tools");
int indexOf = listItemCollection.IndexOf(toolsItem);
Dim products() As String = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" }
' Creates an item collection
Dim listItemCollection As PdfListItemCollection = New PdfListItemCollection(products)
' Creates 'Tools' list item
Dim toolsItem As PdfListItem = New PdfListItem("Tools")
Dim indexOf As Integer = listItemCollection.IndexOf(toolsItem)
- See Also
Insert(int, PdfListItem)
Inserts item at the specified index.
public void Insert(int index, PdfListItem item)
Parameters
index
intThe specified index.
item
PdfListItemThe item.
Examples
string[] products = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" };
// Creates an item collection
PdfListItemCollection listItemCollection = new PdfListItemCollection(products);
PdfListItem newItem = new PdfListItem("PDF");
// Insert a new item in the collection
listItemCollection.Insert(0, newItem);
Dim products() As String = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" }
' Creates an item collection
Dim listItemCollection As PdfListItemCollection = New PdfListItemCollection(products)
Dim newItem As PdfListItem = New PdfListItem("PDF")
' Insert a new item in the collection
listItemCollection.Insert(0, newItem)
- See Also
Insert(int, PdfListItem, float)
Inserts the specified index.
public void Insert(int index, PdfListItem item, float itemIndent)
Parameters
index
intThe index.
item
PdfListItemThe item.
itemIndent
floatThe item indent.
Examples
string[] products = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" };
// Creates an item collection
PdfListItemCollection listItemCollection = new PdfListItemCollection(products);
PdfListItem newItem = new PdfListItem("PDF");
// Insert a new item in the collection
listItemCollection.Insert(0, newItem, 10);
Dim products() As String = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" }
' Creates an item collection
Dim listItemCollection As PdfListItemCollection = New PdfListItemCollection(products)
Dim newItem As PdfListItem = New PdfListItem("PDF")
' Insert a new item in the collection
listItemCollection.Insert(0, newItem, 10)
- See Also
Remove(PdfListItem)
Removes the specified item from the list.
public void Remove(PdfListItem item)
Parameters
item
PdfListItemThe specified item.
Examples
string[] products = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" };
// Creates an item collection
PdfListItemCollection listItemCollection = new PdfListItemCollection(products);
PdfListItem toolsItem = new PdfListItem("Tools");
// Remove 'Tools' list item
listItemCollection.Remove(toolsItem);
Dim products() As String = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" }
' Creates an item collection
Dim listItemCollection As PdfListItemCollection = New PdfListItemCollection(products)
Dim toolsItem As PdfListItem = New PdfListItem("Tools")
' Remove 'Tools' list item
listItemCollection.Remove(toolsItem)
- See Also
RemoveAt(int)
Removes the item at the specified index from the list.
public void RemoveAt(int index)
Parameters
index
inthe specified index.
Examples
string[] products = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" };
// Creates an item collection
PdfListItemCollection listItemCollection = new PdfListItemCollection(products);
// Remove the firse item from the collection
listItemCollection.RemoveAt(0);
Dim products() As String = { "Tools", "Grid", "Chart", "Edit", "Diagram", "XlsIO", "Grouping", "Calculate", "PDF", "HTMLUI", "DocIO" }
' Creates an item collection
Dim listItemCollection As PdfListItemCollection = New PdfListItemCollection(products)
' Remove the firse item from the collection
listItemCollection.RemoveAt(0)
- See Also