Class PdfListItemCollection
Represents collection of list items.
Implements
Inherited Members
Namespace: Syncfusion.Pdf.Lists
Assembly: Syncfusion.Pdf.Base.dll
Syntax
public class PdfListItemCollection : PdfCollection, IEnumerable
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.
Declaration
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)
PdfListItemCollection(String[])
Initializes a new instance of the PdfListItemCollection class.
Declaration
public PdfListItemCollection(string[] items)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | items | 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")
Properties
Item[Int32]
Gets the PdfListItem from collection at the specified index.
Declaration
public PdfListItem this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Property Value
Type | Description |
---|---|
PdfListItem |
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.
Declaration
public int Add(PdfListItem item)
Parameters
Type | Name | Description |
---|---|---|
PdfListItem | item | The item. |
Returns
Type | Description |
---|---|
System.Int32 | 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)
Add(PdfListItem, Single)
Adds the specified item.
Declaration
public int Add(PdfListItem item, float itemIndent)
Parameters
Type | Name | Description |
---|---|---|
PdfListItem | item | The item. |
System.Single | itemIndent | The item indent. |
Returns
Type | Description |
---|---|
System.Int32 |
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)
Add(String)
Adds the item with a specified text.
Declaration
public PdfListItem Add(string text)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | The text. |
Returns
Type | Description |
---|---|
PdfListItem |
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)
Add(String, PdfFont)
Adds the specified text.
Declaration
public PdfListItem Add(string text, PdfFont font)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | The text. |
PdfFont | font | The font. |
Returns
Type | Description |
---|---|
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)
Add(String, PdfFont, Single)
Adds the specified text.
Declaration
public PdfListItem Add(string text, PdfFont font, float itemIndent)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | The text. |
PdfFont | font | The font. |
System.Single | itemIndent | The item indent. |
Returns
Type | Description |
---|---|
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)
Add(String, Single)
Adds the specified text.
Declaration
public PdfListItem Add(string text, float itemIndent)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | The text. |
System.Single | itemIndent | The item indent. |
Returns
Type | Description |
---|---|
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)
Clear()
Clears collection.
Declaration
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()
IndexOf(PdfListItem)
Determines the index of a specific item in the list.
Declaration
public int IndexOf(PdfListItem item)
Parameters
Type | Name | Description |
---|---|---|
PdfListItem | item | The item to locate in the list. |
Returns
Type | Description |
---|---|
System.Int32 | 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)
Insert(Int32, PdfListItem)
Inserts item at the specified index.
Declaration
public void Insert(int index, PdfListItem item)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The specified index. |
PdfListItem | item | The 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)
Insert(Int32, PdfListItem, Single)
Inserts the specified index.
Declaration
public void Insert(int index, PdfListItem item, float itemIndent)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index. |
PdfListItem | item | The item. |
System.Single | itemIndent | The 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)
Remove(PdfListItem)
Removes the specified item from the list.
Declaration
public void Remove(PdfListItem item)
Parameters
Type | Name | Description |
---|---|---|
PdfListItem | item | The 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)
RemoveAt(Int32)
Removes the item at the specified index from the list.
Declaration
public void RemoveAt(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | he 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)