Table of Contents

Class ListItem

Namespace
iTextSharp.text
Assembly
iTextSharp.LGPLv2.Core.dll

A ListItem is a Paragraph that can be added to a List.

public class ListItem : Paragraph, IList<IElement>, ICollection<IElement>, IList, ICollection, IReadOnlyList<IElement>, IReadOnlyCollection<IElement>, IEnumerable<IElement>, IEnumerable, ITextElementArray, IElement
Inheritance
ListItem
Implements
Inherited Members
Extension Methods

Examples

Example 1: List list = new List(true, 20); list.Add( new ListItem("First line") ); list.Add( new ListItem("The second line is longer to see what happens once the end of the line is reached. Will it start on a new line?") ); list.Add( new ListItem("Third line") ); The result of this code looks like this: First line The second line is longer to see what happens once the end of the line is reached. Will it start on a new line? Third line Example 2: List overview = new List(false, 10); overview.Add( new ListItem("This is an item") ); overview.Add("This is another item"); The result of this code looks like this: This is an item This is another item

Constructors

ListItem()

constructors

public ListItem()

ListItem(float)

Constructs a ListItem with a certain leading.

public ListItem(float leading)

Parameters

leading float

the leading

ListItem(float, string)

Constructs a ListItem with a certain string and a certain leading.

public ListItem(float leading, string str)

Parameters

leading float

the leading

str string

a string

ListItem(float, string, Font)

Constructs a ListItem with a certain leading, string and Font.

public ListItem(float leading, string str, Font font)

Parameters

leading float

the leading

str string

a string

font Font

a Font

ListItem(float, Chunk)

Constructs a ListItem with a certain Chunk and a certain leading.

public ListItem(float leading, Chunk chunk)

Parameters

leading float

the leading

chunk Chunk

a Chunk

ListItem(string)

Constructs a ListItem with a certain string.

public ListItem(string str)

Parameters

str string

a string

ListItem(string, Font)

Constructs a ListItem with a certain string and a certain Font.

public ListItem(string str, Font font)

Parameters

str string

a string

font Font

a string

ListItem(Chunk)

Constructs a ListItem with a certain Chunk.

public ListItem(Chunk chunk)

Parameters

chunk Chunk

a Chunk

ListItem(Phrase)

Constructs a ListItem with a certain Phrase.

public ListItem(Phrase phrase)

Parameters

phrase Phrase

a Phrase

Properties

ListSymbol

implementation of the Element-methods

public Chunk ListSymbol { get; set; }

Property Value

Chunk

a Chunk

Type

Gets the type of the text element.

public override int Type { get; }

Property Value

int

a type

Methods

IsTag(string)

methods

public static bool IsTag(string tag)

Parameters

tag string

the given tag

Returns

bool

true if the tag corresponds

SetIndentationLeft(float, bool)

Sets the indentation of this paragraph on the left side.

public void SetIndentationLeft(float indentation, bool autoindent)

Parameters

indentation float
autoindent bool