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
floatthe leading
ListItem(float, string)
Constructs a ListItem with a certain string and a certain leading.
public ListItem(float leading, string str)
Parameters
ListItem(float, string, Font)
Constructs a ListItem with a certain leading, string and Font.
public ListItem(float leading, string str, Font font)
Parameters
ListItem(float, Chunk)
Constructs a ListItem with a certain Chunk and a certain leading.
public ListItem(float leading, Chunk chunk)
Parameters
ListItem(string)
Constructs a ListItem with a certain string.
public ListItem(string str)
Parameters
str
stringa string
ListItem(string, Font)
Constructs a ListItem with a certain string and a certain Font.
public ListItem(string str, Font font)
Parameters
ListItem(Chunk)
Constructs a ListItem with a certain Chunk.
public ListItem(Chunk chunk)
Parameters
chunk
Chunka Chunk
ListItem(Phrase)
Constructs a ListItem with a certain Phrase.
public ListItem(Phrase phrase)
Parameters
phrase
Phrasea 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
stringthe 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)