Skip to main content
Skip table of contents

ListItem

ListItem Public class

Description

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

Diagram

  flowchart LR
  classDef interfaceStyle stroke-dasharray: 5 5;
  classDef abstractStyle stroke-width:4px
  subgraph iTextSharp.text
  iTextSharp.text.ListItem[[ListItem]]
  iTextSharp.text.Paragraph[[Paragraph]]
  end
iTextSharp.text.Paragraph --> iTextSharp.text.ListItem

Members

Properties

Public properties
TypeNameMethods
ListBodyListBodyget
ListLabelListLabelget
ChunkListSymbol
Get/set the listsymbol.
get, set
intType
Gets the type of the text element.
get

Methods

Public methods
ReturnsName
voidAdjustListSymbolFont()
ParagraphCloneShallow(bool spacingBefore)
voidSetIndentationLeft(float indentation, bool autoindent)

Details

Summary

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

Example

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");
            

Inheritance

Constructors

ListItem [1/9]

Source code

public ListItem()
Summary

Constructs a ListItem.

ListItem [2/9]

Source code

public ListItem(float leading)
Arguments
TypeNameDescription
floatleadingthe leading
Summary

Constructs a ListItem with a certain leading.

ListItem [3/9]

Source code

public ListItem(Chunk chunk)
Arguments
TypeNameDescription
Chunkchunka Chunk
Summary

Constructs a ListItem with a certain Chunk.

ListItem [4/9]

Source code

public ListItem(string str)
Arguments
TypeNameDescription
stringstra string
Summary

Constructs a ListItem with a certain string.

ListItem [5/9]

Source code

public ListItem(string str, Font font)
Arguments
TypeNameDescription
stringstra string
Fontfonta string
Summary

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

ListItem [6/9]

Source code

public ListItem(float leading, Chunk chunk)
Arguments
TypeNameDescription
floatleadingthe leading
Chunkchunka Chunk
Summary

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

ListItem [7/9]

Source code

public ListItem(float leading, string str)
Arguments
TypeNameDescription
floatleadingthe leading
stringstra string
Summary

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

ListItem [8/9]

Source code

public ListItem(float leading, string str, Font font)
Arguments
TypeNameDescription
floatleadingthe leading
stringstra string
Fontfonta Font
Summary

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

ListItem [9/9]

Source code

public ListItem(Phrase phrase)
Arguments
TypeNameDescription
Phrasephrasea Phrase
Summary

Constructs a ListItem with a certain Phrase.

Methods

CloneShallow

Source code

public override Paragraph CloneShallow(bool spacingBefore)
Arguments
TypeNameDescription
boolspacingBefore
SetIndentationLeft

Source code

public virtual void SetIndentationLeft(float indentation, bool autoindent)
Arguments
TypeNameDescription
floatindentation
boolautoindent
AdjustListSymbolFont

Source code

public virtual void AdjustListSymbolFont()

Properties

Type
public override int Type { get; }
Summary

Gets the type of the text element.

Value

a type

ListSymbol
public virtual Chunk ListSymbol { get; set; }
Summary

Get/set the listsymbol.

Value

a Chunk

ListBody
public virtual ListBody ListBody { get; }
ListLabel
public virtual ListLabel ListLabel { get; }

Generated with ModularDoc

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.